package com.aspose.cells;

import java.util.ArrayList;
import java.util.HashMap;

class zauy {
   private PivotTable c;
   private Cells d;
   private zaux e;
   private zaux f;
   private boolean g = false;
   private int h = 0;
   private int i = 0;
   private int[][] j = (int[][])null;
   private int[][] k = (int[][])null;
   private int l = 0;
   private int m = 0;
   private HashMap n = new HashMap();
   private ArrayList o = new ArrayList();
   private HashMap p = new HashMap();
   static int a = 50;
   private int q = 0;
   private int r = 0;
   boolean b;
   private ArrayList s;
   private ArrayList t;
   private int u = 0;
   private int v = 0;
   private int w = 0;
   private int x = 0;
   private WorksheetCollection y = null;
   private zaut z;

   zauy(zaut var1) {
      this.z = var1;
      this.a();
   }

   void a() {
      this.c = this.z.a;
      this.e = this.z.c;
      this.f = this.z.d;
      this.d = this.z.b;
      this.r = this.z.h;
      this.q = this.z.g;
      this.b = this.z.j;
      this.s = this.z.s;
      this.t = this.z.t;
      this.u = this.z.o;
      this.v = this.z.p;
      this.w = this.z.q;
      this.x = this.z.r;
      this.y = this.c.a.b.getWorkbook().getWorksheets();
   }

   void b() {
      this.l = 0;
      this.m = 0;
      this.n = new HashMap();
      this.p = new HashMap();
      this.a(this.e, this.c.getRowFields(), 0);
      this.g();
      this.b(this.f, this.c.getColumnFields(), 0);
   }

   private void g() {
      PivotFieldCollection var1 = this.c.getRowFields();
      if (var1.a()) {
         int var2 = this.n.size() - 1;

         for(int var3 = 0; var3 < var2; ++var3) {
            if (!((String)this.n.get(var3 + 1)).startsWith("rowsubtitle1") && !"grandtotalrow".equals((String)this.n.get(var3 + 1)) && "blank".equals((String)this.n.get(var3))) {
               this.n.remove(var3);
            }
         }

         if ("blank".equals((String)this.n.get(var2))) {
            this.n.remove(var2);
         }
      }

   }

   private void a(zaux var1, PivotFieldCollection var2, int var3) {
      if (var1 != null && var1.d != null && var1.d.size() != 0) {
         int var4;
         for(var4 = 0; var4 < var1.d.size(); ++var4) {
            zaux var5 = (zaux)var1.d.get(var4);
            String var10;
            if (var3 + 1 == var2.getCount()) {
               var10 = (String)this.n.get(this.l);
               if (var10 != null && var10.startsWith("rowsubtitle")) {
                  this.n.put(this.l, var10 + "+" + (var3 + 1));
               } else {
                  this.n.put(this.l, "rowsubtitle" + (var3 + 1));
               }

               ++this.l;
            } else if (var5.a.a()) {
               var10 = (String)this.n.get(this.l);
               if (var10 != null && var10.startsWith("rowsubtitle")) {
                  this.n.put(this.l, var10 + "+" + (var3 + 1));
               } else {
                  this.n.put(this.l, "rowsubtitle" + (var3 + 1));
               }

               com.aspose.cells.b.a.a.ze.a(this.o, (Object)this.l);
               ++this.l;
               PivotField var13 = var2.get(var3);
               if (var13.getInsertBlankRow()) {
                  this.n.put(this.l, "blank");
                  ++this.l;
               }
            } else {
               PivotField var6 = var2.get(var3);
               String var7 = (String)this.n.get(this.l);
               if (var7 != null && var7.startsWith("rowsubtitle")) {
                  this.n.put(this.l, var7 + "+" + (var3 + 1));
               } else {
                  this.n.put(this.l, "rowsubtitle" + (var3 + 1));
               }

               if (var6.getShowInOutlineForm()) {
                  ++this.l;
               }

               this.a(var5, var2, var3 + 1);
            }
         }

         int var9;
         if (var3 == 0) {
            if (this.c.getColumnGrand()) {
               if (this.q == 1) {
                  if (this.u > 1) {
                     var4 = this.w;

                     for(var9 = 0; var9 < var4; ++var9) {
                        this.n.put(this.l, "grandtotalrow");
                        ++this.l;
                     }
                  }
               } else {
                  this.n.put(this.l, "grandtotalrow");
                  ++this.l;
               }
            }
         } else if (var3 + 1 <= var2.getCount()) {
            PivotField var8 = var2.get(var3 - 1);
            if (!var8.k()) {
               if (this.q == 1) {
                  if (var2.getCount() > 2 && !var8.k() && this.c.getDataField() != null && var8.getPosition() < this.c.getDataField().getPosition() && (this.c.getDataField().getPosition() != var2.getCount() - 1 || this.c.getDataField().getPosition() == var2.getCount() - 1 && var8.getPosition() < var2.getCount() - 2) || !var8.getShowInOutlineForm() && !var8.k() && var8.getPosition() + 1 < var2.getCount() && !var2.get(var8.getPosition() + 1).i() || var8.getShowInOutlineForm() && !var8.getShowSubtotalAtTop()) {
                     var9 = this.w;

                     for(int var12 = 0; var12 < var9; ++var12) {
                        this.n.put(this.l, "rowsubtotal" + var3);
                        ++this.l;
                     }
                  }
               } else if (var8.getShowInOutlineForm() && !var8.getShowSubtotalAtTop() || !var8.getShowInOutlineForm()) {
                  this.n.put(this.l, "rowsubtotal" + var3);
                  ++this.l;
               }
            }

            if (var8.getInsertBlankRow() && !var8.i()) {
               String var11 = (String)this.n.get(this.l - 1);
               if (var11 == null || !"blank".equals(var11)) {
                  this.n.put(this.l, "blank");
                  ++this.l;
               }
            }
         }

      }
   }

   private void b(zaux var1, PivotFieldCollection var2, int var3) {
      if (var1 != null && var1.d != null && var1.d.size() != 0) {
         int var4;
         for(var4 = 0; var4 < var1.d.size(); ++var4) {
            zaux var5 = (zaux)var1.d.get(var4);
            String var6;
            if (var3 + 1 == var2.getCount()) {
               var6 = (String)this.p.get(this.m);
               if (var6 != null && var6.startsWith("columnsubtitle")) {
                  this.p.put(this.m, var6 + "+" + (var3 + 1));
               } else {
                  this.p.put(this.m, "columnsubtitle" + (var3 + 1));
               }

               ++this.m;
            } else if (var5.a.a()) {
               var6 = (String)this.p.get(this.m);
               if (var6 != null && var6.startsWith("columnsubtitle")) {
                  this.p.put(this.m, var6 + "+" + (var3 + 1));
               } else {
                  this.p.put(this.m, "columnsubtitle" + (var3 + 1));
               }

               ++this.m;
            } else {
               var6 = (String)this.p.get(this.m);
               if (var6 != null && var6.startsWith("columnsubtitle")) {
                  this.p.put(this.m, var6 + "+" + (var3 + 1));
               } else {
                  this.p.put(this.m, "columnsubtitle" + (var3 + 1));
               }

               this.b(var5, var2, var3 + 1);
            }
         }

         int var8;
         if (var3 == 0) {
            if (this.c.getRowGrand()) {
               if (this.q == 2) {
                  if (this.v > 1) {
                     var4 = this.w;

                     for(var8 = 0; var8 < var4; ++var8) {
                        this.p.put(this.m, "grandtotalcolumn");
                        ++this.m;
                     }
                  }
               } else {
                  this.p.put(this.m, "grandtotalcolumn");
                  ++this.m;
               }
            }
         } else if (var3 + 1 <= var2.getCount()) {
            PivotField var7 = var2.get(var3 - 1);
            if (!var7.k()) {
               if (this.q == 2) {
                  if (var7.getPosition() - this.r != -1 && var7.getPosition() != this.r) {
                     if (var7.getPosition() < this.r) {
                        var8 = this.w;

                        for(int var9 = 0; var9 < var8; ++var9) {
                           this.p.put(this.m, "columnsubtotal" + var3);
                           ++this.m;
                        }
                     } else {
                        this.p.put(this.m, "columnsubtotal" + var3);
                        ++this.m;
                     }
                  }
               } else {
                  this.p.put(this.m, "columnsubtotal" + var3);
                  ++this.m;
               }
            }
         }

      }
   }

   void c() {
      int var1;
      int var2;
      Cell var3;
      Style var4;
      if (this.c.ad != null) {
         for(var1 = this.c.i; var1 <= this.c.j; ++var1) {
            for(var2 = this.c.k; var2 <= this.c.l; ++var2) {
               var3 = this.c.a.b.getCells().a(var1, var2, false);
               var4 = this.c.ac.a(this.c.ad[var1 - this.c.i][var2 - this.c.k]);
               zka.a(var4, var3.getStyle());
               var3.a(var4);
            }
         }
      }

      if (this.c.ae != null && this.x > 0) {
         for(var1 = 0; var1 < this.x; ++var1) {
            for(var2 = 0; var2 < 2; ++var2) {
               var3 = this.c.a.b.getCells().a(this.c.i - 1 - this.x + var1, this.c.k + var2, false);
               var4 = this.c.ac.a(this.c.ae[var1][var2]);
               zka.a(var4, var3.getStyle());
               var3.a(var4);
            }
         }
      }

   }

   private void h() {
      this.c.ac = new zavc(this.y);
      Style var1 = new Style(this.y);
      var1.a((WorksheetCollection)this.y, (int)15);
      this.c.ac.b(var1);
      this.g = this.x > 0;
      int var2;
      int var3;
      if (this.g) {
         this.c.ae = new int[this.x][2];
         this.k = new int[this.x][2];

         for(var2 = 0; var2 < this.x; ++var2) {
            for(var3 = 0; var3 < 2; ++var3) {
               this.k[var2][var3] = -1;
            }
         }
      }

      this.h = this.c.j - this.c.i + 1;
      this.i = this.c.l - this.c.k + 1;
      this.c.ad = new int[this.h][this.i];
      this.j = new int[this.h][this.i];

      for(var2 = 0; var2 < this.h; ++var2) {
         for(var3 = 0; var3 < this.i; ++var3) {
            this.j[var2][var3] = -1;
         }
      }

   }

   private void i() {
      int var1 = this.c.n - this.c.i;
      int var2 = this.h - 1;
      boolean var3 = false;
      if (this.c.ad.length != 0) {
         int var4;
         int var6;
         Style var8;
         int var21;
         PivotField var22;
         for(var4 = var1; var4 <= var2; ++var4) {
            String var5 = (String)this.n.get(var4 - var1);
            if (var5 != null) {
               int var13;
               if (var5.startsWith("rowsubtitle")) {
                  int[] var17 = this.a(com.aspose.cells.b.a.zv.d(var5.substring("rowsubtitle".length()), '+'));

                  for(var21 = 0; var21 < var17.length; ++var21) {
                     var22 = this.c.getRowFields().get(var17[var21] - 1);
                     if (!var22.i()) {
                        var13 = this.c(var17[var21] - 1);
                        Style var9 = this.g(this.c.ad[var4][var13]);
                        var9.setCustom(var22.getNumberFormat());
                        var9.d(var22.getNumber());
                        this.c.ad[var4][var13] = this.c.ac.a(var9);
                     }
                  }
               } else if (var5.startsWith("rowsubtotal")) {
                  var6 = com.aspose.cells.b.a.zo.a(var5.substring("rowsubtotal".length()));
                  PivotField var7 = this.c.getRowFields().get(var6 - 1);
                  if (!var7.i()) {
                     var13 = this.c(var6 - 1);
                     var8 = this.g(this.c.ad[var4][var13]);
                     var8.setCustom(var7.getNumberFormat());
                     var8.d(var7.getNumber());
                     this.c.ad[var4][var13] = this.c.ac.a(var8);
                  }
               } else if ("grandtotalrow".equals(var5) && this.u > 0) {
                  PivotField var16 = this.c.getRowFields().get(0);
                  byte var14 = 0;
                  Style var19 = this.g(this.c.ad[var4][var14]);
                  var19.setCustom(var16.getNumberFormat());
                  var19.d(var16.getNumber());
                  this.c.ad[var4][var14] = this.c.ac.a(var19);
               }
            }
         }

         var4 = this.c.o - this.c.k;
         int var15 = this.i - 1;
         boolean var18 = false;

         Style var11;
         int var25;
         PivotField var26;
         int var29;
         for(var21 = var4; var21 <= var15; ++var21) {
            String var23 = (String)this.p.get(var21 - var4);
            if (var23 != null) {
               if (var23.startsWith("columnsubtitle")) {
                  int[] var27 = this.a(com.aspose.cells.b.a.zv.d(var23.substring("columnsubtitle".length()), '+'));

                  for(var29 = 0; var29 < var27.length; ++var29) {
                     PivotField var30 = this.c.getColumnFields().get(var27[var29] - 1);
                     if (!var30.i()) {
                        var6 = var27[var29];
                        Style var12 = this.g(this.c.ad[var6][var21]);
                        var12.setCustom(var30.getNumberFormat());
                        var12.d(var30.getNumber());
                        this.c.ad[var6][var21] = this.c.ac.a(var12);
                     }
                  }
               } else if (var23.startsWith("columnsubtotal")) {
                  var25 = com.aspose.cells.b.a.zo.a(var23.substring("columnsubtotal".length()));
                  PivotField var10 = this.c.getColumnFields().get(var25 - 1);
                  if (!var10.i()) {
                     var11 = this.g(this.c.ad[var25][var21]);
                     var11.setCustom(var10.getNumberFormat());
                     var11.d(var10.getNumber());
                     this.c.ad[var25][var21] = this.c.ac.a(var11);
                  }
               } else if ("grandtotalcolumn".equals(var23) && this.v > 0) {
                  var26 = this.c.getColumnFields().get(0);
                  byte var20 = 1;
                  Style var28 = this.g(this.c.ad[var20][var21]);
                  var28.setCustom(var26.getNumberFormat());
                  var28.d(var26.getNumber());
                  this.c.ad[var20][var21] = this.c.ac.a(var28);
               }
            }
         }

         if (this.w > 0) {
            var21 = this.w;

            for(int var24 = var4; var24 <= var15; ++var24) {
               var26 = this.c.getDataFields().get((var24 - var4) % var21);

               for(var29 = var1; var29 <= var2; ++var29) {
                  var11 = this.g(this.c.ad[var29][var24]);
                  var11.setCustom(var26.getNumberFormat());
                  var11.d(var26.getNumber());
                  this.c.ad[var29][var24] = this.c.ac.a(var11);
               }
            }
         }

         if (this.g) {
            var21 = this.x;
            var8 = null;

            for(var25 = 0; var25 < var21; ++var25) {
               var22 = this.c.getPageFields().get(var25);

               for(var29 = 0; var29 < 2; ++var29) {
                  var11 = this.g(this.c.ae[var25][var29]);
                  var11.setCustom(var22.getNumberFormat());
                  var11.d(var22.getNumber());
                  this.c.ae[var25][var29] = this.c.ac.a(var11);
               }
            }
         }

      }
   }

   void d() {
      this.h();
      this.i();
      if (this.c.af) {
         this.F();
         if (this.c.d() == null) {
            return;
         }

         TableStyleElement var1 = this.c.d().getTableStyleElements().getByTableStyleElementType(0);
         Style var2 = var1 != null ? var1.a() : null;
         var1 = this.c.d().getTableStyleElements().getByTableStyleElementType(1);
         Style var3 = var1 != null ? var1.a() : null;
         var1 = this.c.d().getTableStyleElements().getByTableStyleElementType(2);
         Style var4 = var1 != null ? var1.a() : null;
         var1 = this.c.d().getTableStyleElements().getByTableStyleElementType(3);
         Style var5 = var1 != null ? var1.a() : null;
         int var6 = var5 != null ? var1.getSize() : 1;
         var1 = this.c.d().getTableStyleElements().getByTableStyleElementType(4);
         Style var7 = var1 != null ? var1.a() : null;
         int var8 = var7 != null ? var1.getSize() : 1;
         int var9 = var6 + var8;
         int var10 = this.c.o - this.c.k;
         int var11 = this.c.n - this.c.i;
         var1 = this.c.d().getTableStyleElements().getByTableStyleElementType(5);
         Style var12 = var1 != null ? var1.a() : null;
         int var13 = var12 != null ? var1.getSize() : 1;
         var1 = this.c.d().getTableStyleElements().getByTableStyleElementType(6);
         Style var14 = var1 != null ? var1.a() : null;
         int var15 = var14 != null ? var1.getSize() : 1;
         int var16 = var13 + var15;
         byte var17 = 0;
         int var18 = this.c.n - this.c.i;
         var1 = this.c.d().getTableStyleElements().getByTableStyleElementType(8);
         Style var19 = var1 != null ? var1.a() : null;
         int var20 = this.c.o - 1 - this.c.k;
         var1 = this.c.d().getTableStyleElements().getByTableStyleElementType(9);
         Style var21 = var1 != null ? var1.a() : null;
         int var22 = this.c.n - 1 - this.c.i;
         var1 = this.c.d().getTableStyleElements().getByTableStyleElementType(11);
         Style var23 = var1 != null ? var1.a() : null;
         int var24 = this.c.n - 2 - this.c.i;
         int var25 = this.c.o - 1 - this.c.k;
         var1 = this.c.d().getTableStyleElements().getByTableStyleElementType(15);
         Style var26 = var1 != null ? var1.a() : null;
         var1 = this.c.d().getTableStyleElements().getByTableStyleElementType(16);
         Style var27 = var1 != null ? var1.a() : null;
         var1 = this.c.d().getTableStyleElements().getByTableStyleElementType(17);
         Style var28 = var1 != null ? var1.a() : null;
         int var29 = this.c.o - this.c.k;
         Style[] var30 = new Style[]{var26, var27, var28};
         var1 = this.c.d().getTableStyleElements().getByTableStyleElementType(18);
         Style var31 = var1 != null ? var1.a() : null;
         int var32 = this.c.n - this.c.i;
         var1 = this.c.d().getTableStyleElements().getByTableStyleElementType(19);
         Style var33 = var1 != null ? var1.a() : null;
         var1 = this.c.d().getTableStyleElements().getByTableStyleElementType(20);
         Style var34 = var1 != null ? var1.a() : null;
         var1 = this.c.d().getTableStyleElements().getByTableStyleElementType(21);
         Style var35 = var1 != null ? var1.a() : null;
         int var36 = this.c.n - this.c.i;
         var1 = this.c.d().getTableStyleElements().getByTableStyleElementType(28);
         Style var37 = var1 != null ? var1.a() : null;
         var1 = this.c.d().getTableStyleElements().getByTableStyleElementType(29);
         Style var38 = var1 != null ? var1.a() : null;
         int var39;
         int var40;
         zda var41;
         Style var42;
         if (this.g) {
            for(var39 = 0; var39 < this.x; ++var39) {
               for(var40 = 0; var40 < 2; ++var40) {
                  if (var2 != null) {
                     var41 = new zda();
                     this.a(var41, var39, 0, this.x - 1);
                     this.b(var41, var40, 0, 1);
                     var42 = this.g(this.c.ae[var39][var40]);
                     this.k[var39][var40] = zka.a(var42, var2, var41, 0, this.k[var39][var40]);
                     this.c.ae[var39][var40] = this.c.ac.a(var42);
                  }
               }

               zda var51;
               Style var52;
               if (var3 != null) {
                  var51 = new zda();
                  var51.c = true;
                  var51.d = true;
                  this.a(var51, var39, 0, this.x - 1);
                  var52 = this.g(this.c.ae[var39][0]);
                  this.k[var39][0] = zka.a(var52, var3, var51, 1, this.k[var39][0]);
                  this.c.ae[var39][0] = this.c.ac.a(var52);
               }

               if (var4 != null) {
                  var51 = new zda();
                  var51.c = true;
                  var51.d = true;
                  this.a(var51, var39, 0, this.x - 1);
                  var52 = this.g(this.c.ae[var39][1]);
                  this.k[var39][1] = zka.a(var52, var4, var51, 2, this.k[var39][1]);
                  this.c.ae[var39][1] = this.c.ac.a(var52);
               }
            }
         }

         Style var43;
         Style var44;
         for(var39 = 0; var39 < this.h; ++var39) {
            for(var40 = 0; var40 < this.i; ++var40) {
               if (var2 != null) {
                  var41 = new zda();
                  this.a(var41, var39, 0, this.h - 1);
                  this.b(var41, var40, 0, this.i - 1);
                  var42 = this.g(this.c.ad[var39][var40]);
                  this.j[var39][var40] = zka.a(var42, var2, var41, 0, this.j[var39][var40]);
                  this.c.ad[var39][var40] = this.c.ac.a(var42);
               }

               int var54;
               zda var55;
               int var56;
               zda var57;
               if (this.c.getShowPivotStyleColumnStripes() && (var5 != null || var7 != null) && var40 >= var10 && var39 >= var11) {
                  var54 = (var40 - var10) % var9;
                  if (var54 >= 0 && var54 < var6 && var5 != null) {
                     var55 = new zda();
                     this.b(var55, var54, 0, var6 - 1);
                     this.a(var55, var39, var11, this.h - 1);
                     var43 = this.g(this.c.ad[var39][var40]);
                     this.j[var39][var40] = zka.a(var43, var5, var55, 3, this.j[var39][var40]);
                     this.c.ad[var39][var40] = this.c.ac.a(var43);
                  }

                  var56 = var54 - var6;
                  if (var56 >= 0 && var56 < var8 && var7 != null) {
                     var57 = new zda();
                     this.b(var57, var56, 0, var8 - 1);
                     this.a(var57, var39, var11, this.h - 1);
                     var44 = this.g(this.c.ad[var39][var40]);
                     this.j[var39][var40] = zka.a(var44, var7, var57, 4, this.j[var39][var40]);
                     this.c.ad[var39][var40] = this.c.ac.a(var44);
                  }
               }

               if (this.c.getShowPivotStyleRowStripes() && (var12 != null || var14 != null) && var39 >= var18 && var40 >= var17) {
                  var54 = (var39 - var18) % var16;
                  if (var54 >= 0 && var54 < var13 && var12 != null) {
                     var55 = new zda();
                     this.a(var55, var54, 0, var13 - 1);
                     this.b(var55, var40, var17, this.i - 1);
                     var43 = this.g(this.c.ad[var39][var40]);
                     this.j[var39][var40] = zka.a(var43, var12, var55, 5, this.j[var39][var40]);
                     this.c.ad[var39][var40] = this.c.ac.a(var43);
                  }

                  var56 = var54 - var13;
                  if (var56 >= 0 && var56 < var15 && var14 != null) {
                     var57 = new zda();
                     this.a(var57, var56, 0, var15 - 1);
                     this.b(var57, var40, var17, this.i - 1);
                     var44 = this.g(this.c.ad[var39][var40]);
                     this.j[var39][var40] = zka.a(var44, var14, var57, 6, this.j[var39][var40]);
                     this.c.ad[var39][var40] = this.c.ac.a(var44);
                  }
               }

               if (this.c.getShowPivotStyleRowHeader() && (this.u > 0 || this.v > 0) && var19 != null && var40 <= var20) {
                  var41 = new zda();
                  this.a(var41, var39, 0, this.h - 1);
                  this.b(var41, var40, 0, var20);
                  var42 = this.g(this.c.ad[var39][var40]);
                  this.j[var39][var40] = zka.a(var42, var19, var41, 8, this.j[var39][var40]);
                  this.c.ad[var39][var40] = this.c.ac.a(var42);
               }

               if (this.c.getShowPivotStyleColumnHeader() && var21 != null && var39 <= var22) {
                  var41 = new zda();
                  this.a(var41, var39, 0, var22);
                  this.b(var41, var40, 0, this.i - 1);
                  var42 = this.g(this.c.ad[var39][var40]);
                  this.j[var39][var40] = zka.a(var42, var21, var41, 9, this.j[var39][var40]);
                  this.c.ad[var39][var40] = this.c.ac.a(var42);
               }

               if (this.c.getShowPivotStyleRowHeader() && this.c.getShowPivotStyleColumnHeader() && this.v > 0 && var23 != null && var39 <= var24 && var40 <= var25) {
                  var41 = new zda();
                  this.a(var41, var39, 0, var24);
                  this.b(var41, var40, 0, var25);
                  var42 = this.g(this.c.ad[var39][var40]);
                  this.j[var39][var40] = zka.a(var42, var23, var41, 11, this.j[var39][var40]);
                  this.c.ad[var39][var40] = this.c.ac.a(var42);
               }

               int var45;
               zda var47;
               Style var48;
               String var58;
               Object[] var59;
               if (this.v > 1 && (var26 != null || var27 != null || var28 != null) && var40 >= var29) {
                  var58 = (String)this.p.get(var40 - var29);
                  if (var58 != null && var58.startsWith("columnsubtotal")) {
                     var56 = com.aspose.cells.b.a.zo.a(var58.substring("columnsubtotal".length()));
                     var59 = this.a(var56, var30);
                     var44 = (Style)var59[0];
                     var45 = (Integer)var59[1];
                     if (var39 >= var56 && var44 != null) {
                        var47 = new zda();
                        this.a(var47, var39, var56, this.h - 1);
                        var47.c = true;
                        var47.d = true;
                        var48 = this.g(this.c.ad[var39][var40]);
                        this.j[var39][var40] = zka.a(var48, var44, var47, var45, this.j[var39][var40]);
                        this.c.ad[var39][var40] = this.c.ac.a(var48);
                     }
                  }
               }

               if (this.u > 1 && var31 != null && var39 >= var32) {
                  var58 = (String)this.n.get(var39 - var32);
                  if (var58 != null && "blank".equals(var58)) {
                     var55 = new zda();
                     this.b(var55, var40, 0, this.i - 1);
                     var55.a = true;
                     var55.b = true;
                     var43 = this.g(this.c.ad[var39][var40]);
                     this.j[var39][var40] = zka.a(var43, var31, var55, 18, this.j[var39][var40]);
                     this.c.ad[var39][var40] = this.c.ac.a(var43);
                  }
               }

               if (this.u > 1 && (var33 != null || var34 != null || var35 != null) && var39 >= var36) {
                  var58 = (String)this.n.get(var39 - var36);
                  if (var58 != null && var58.startsWith("rowsubtotal")) {
                     var56 = com.aspose.cells.b.a.zo.a(var58.substring("rowsubtotal".length()));
                     var59 = this.b(var56, new Style[]{var33, var34, var35});
                     var44 = (Style)var59[0];
                     var45 = (Integer)var59[1];
                     int var46 = this.c(var56 - 1);
                     if (var40 >= var46 && var44 != null) {
                        var47 = new zda();
                        this.b(var47, var40, var46, this.i - 1);
                        var47.a = true;
                        var47.b = true;
                        var48 = this.g(this.c.ad[var39][var40]);
                        this.j[var39][var40] = zka.a(var48, var44, var47, var45, this.j[var39][var40]);
                        this.c.ad[var39][var40] = this.c.ac.a(var48);
                     }
                  }
               }

               byte var60;
               int var61;
               int var62;
               zda var63;
               Style var65;
               if (this.c.getRowGrand() && var37 != null && (this.v != 1 || !this.c.getColumnFields().get(0).i())) {
                  var60 = 1;
                  if (this.v == 0) {
                     var60 = 0;
                  }

                  var56 = this.h - 1;
                  var61 = this.i - 1;
                  var62 = var61;
                  if (this.q == 2 && this.v > 1) {
                     var62 = var61 - this.w + 1;
                  }

                  if (var39 >= var60 && var39 <= var56 && var40 >= var62 && var40 <= var61) {
                     var63 = new zda();
                     this.a(var63, var39, var60, var56);
                     this.b(var63, var40, var62, var61);
                     var65 = this.g(this.c.ad[var39][var40]);
                     this.j[var39][var40] = zka.a(var65, var37, var63, 28, this.j[var39][var40]);
                     this.c.ad[var39][var40] = this.c.ac.a(var65);
                  }
               }

               if (this.c.getColumnGrand() && var38 != null && (this.u != 1 || !this.c.getRowFields().get(0).i()) && (this.u != 0 || this.w <= 1)) {
                  var60 = 0;
                  var56 = this.i - 1;
                  var61 = this.h - 1;
                  var62 = var61;
                  if (this.q == 1 && this.v > 1) {
                     var62 = var61 - this.w + 1;
                  }

                  if (var39 >= var62 && var39 <= var61 && var40 >= var60 && var40 <= var56) {
                     var63 = new zda();
                     this.b(var63, var40, var60, var56);
                     this.a(var63, var39, var62, var61);
                     var65 = this.g(this.c.ad[var39][var40]);
                     this.j[var39][var40] = zka.a(var65, var38, var63, 29, this.j[var39][var40]);
                     this.c.ad[var39][var40] = this.c.ac.a(var65);
                  }
               }
            }
         }

         TableStyleElement var50 = this.c.d().getTableStyleElements().getByTableStyleElementType(22);
         TableStyleElement var53 = this.c.d().getTableStyleElements().getByTableStyleElementType(23);
         TableStyleElement var64 = this.c.d().getTableStyleElements().getByTableStyleElementType(24);
         var42 = null;
         var43 = null;
         var44 = null;
         var42 = var50 != null ? var50.a() : null;
         var43 = var53 != null ? var53.a() : null;
         var44 = var64 != null ? var64.a() : null;
         if (var42 != null || var43 != null || var44 != null) {
            this.d(var42, var43, var44);
         }

         var50 = this.c.d().getTableStyleElements().getByTableStyleElementType(25);
         var53 = this.c.d().getTableStyleElements().getByTableStyleElementType(26);
         var64 = this.c.d().getTableStyleElements().getByTableStyleElementType(27);
         var42 = var50 != null ? var50.a() : null;
         var43 = var53 != null ? var53.a() : null;
         var44 = var64 != null ? var64.a() : null;
         if (var42 != null || var43 != null || var44 != null) {
            this.e(var42, var43, var44);
         }
      } else {
         int var49 = this.c.e.a();
         switch(var49) {
         case 0:
            this.E();
            break;
         case 1:
            this.D();
            break;
         case 2:
            this.j();
            break;
         case 3:
            this.k();
            break;
         case 4:
            this.l();
            break;
         case 5:
            this.m();
            break;
         case 6:
            this.n();
            break;
         case 7:
            this.o();
            break;
         case 8:
            this.p();
            break;
         case 9:
            this.q();
            break;
         case 10:
            this.r();
            break;
         case 11:
            this.s();
            break;
         case 12:
            this.t();
            break;
         case 13:
            this.u();
            break;
         case 14:
            this.v();
            break;
         case 15:
            this.w();
            break;
         case 16:
            this.x();
            break;
         case 17:
            this.y();
            break;
         case 18:
            this.z();
            break;
         case 19:
            this.A();
            break;
         case 20:
            this.B();
            break;
         case 21:
            this.C();
         }
      }

      if (this.g) {
         this.a(this.c.ae, this.k, this.x, 2);
      }

      this.b(this.c.ad, this.j, this.h, this.i);
   }

   private void j() {
      Style var1 = zava.cM(this.y);
      this.o(var1);
      this.p(var1);
      Style var2 = zava.cN(this.y);
      this.k(var2);
      Style var3 = zava.cO(this.y);
      this.c(var3);
      Style var4 = zava.cP(this.y);
      Style var5 = zava.cQ(this.y);
      Style var6 = zava.cR(this.y);
      Style var7 = zava.cS(this.y);
      Style var8 = zava.cT(this.y);
      Style var9 = zava.cU(this.y);
      Style var10 = zava.cV(this.y);
      Style var11 = zava.cW(this.y);
      this.a(var4, var5, var6, var7, (Style)null, var8, var9, var10, var11, (Style)null, (Style)null);
      Style var12 = zava.cX(this.y);
      this.y(var12);
      Style var13 = zava.cY(this.y);
      this.x(var13);
   }

   private void k() {
      Style var1 = zava.dk(this.y);
      this.n(var1);
      Style var2 = zava.cZ(this.y);
      this.o(var2);
      this.p(var2);
      Style var3 = zava.da(this.y);
      this.k(var3);
      Style var4 = zava.db(this.y);
      this.c(var4);
      Style var5 = zava.dl(this.y);
      Style var6 = zava.dm(this.y);
      Style var7 = zava.dn(this.y);
      this.b(var5, var6, var7);
      Style var8 = zava.dc(this.y);
      Style var9 = zava.dd(this.y);
      Style var10 = zava.de(this.y);
      Style var11 = zava.df(this.y);
      Style var12 = zava.dg(this.y);
      Style var13 = zava.dh(this.y);
      Style var14 = zava.di(this.y);
      this.a(var8, (Style)null, (Style)null, var9, (Style)null, var10, var11, (Style)null, var12, var13, var14);
      Style var15 = zava.dj(this.y);
      this.y(var15);
   }

   private void l() {
      Style var1 = zava.do(this.y);
      this.o(var1);
      this.p(var1);
      Style var2 = zava.dp(this.y);
      this.k(var2);
      Style var3 = zava.dq(this.y);
      this.c(var3);
      Style var4 = zava.dr(this.y);
      Style var5 = zava.ds(this.y);
      Style var6 = zava.dt(this.y);
      Style var7 = zava.du(this.y);
      Style var8 = zava.dv(this.y);
      Style var9 = zava.dw(this.y);
      this.a(var4, var5, var4, var6, (Style)null, var6, var7, var8, var9, (Style)null, (Style)null);
      Style var10 = zava.dx(this.y);
      this.y(var10);
   }

   private void m() {
      Style var1 = zava.dy(this.y);
      this.o(var1);
      this.p(var1);
      Style var2 = zava.dz(this.y);
      this.k(var2);
      Style var3 = zava.dA(this.y);
      this.c(var3);
      Style var4 = zava.dB(this.y);
      Style var5 = zava.dC(this.y);
      Style var6 = zava.dD(this.y);
      this.b(var4, var5, var6);
      Style var7 = zava.dE(this.y);
      Style var8 = zava.dF(this.y);
      Style var9 = zava.dG(this.y);
      Style var10 = zava.dH(this.y);
      Style var11 = zava.dI(this.y);
      Style var12 = zava.dJ(this.y);
      this.a(var7, (Style)null, (Style)null, var8, (Style)null, (Style)null, var9, (Style)null, var10, var11, var12);
      Style var13 = zava.dK(this.y);
      this.y(var13);
   }

   private void n() {
      Style var1 = zava.dL(this.y);
      this.o(var1);
      this.p(var1);
      Style var2 = zava.dM(this.y);
      this.k(var2);
      this.j(var2);
      Style var3 = zava.dN(this.y);
      this.c(var3);
      Style var4 = zava.dO(this.y);
      Style var5 = zava.dP(this.y);
      Style var6 = zava.dQ(this.y);
      this.b(var4, var5, var6);
      Style var7 = zava.dR(this.y);
      Style var8 = zava.dS(this.y);
      Style var9 = zava.dT(this.y);
      Style var10 = zava.dU(this.y);
      Style var11 = zava.dV(this.y);
      Style var12 = zava.dW(this.y);
      Style var13 = zava.dX(this.y);
      this.a(var7, (Style)null, (Style)null, var8, (Style)null, var9, var10, (Style)null, var11, var12, var13);
      Style var14 = zava.dY(this.y);
      this.y(var14);
   }

   private void o() {
      Style var1 = zava.dZ(this.y);
      this.n(var1);
      Style var2 = zava.ea(this.y);
      this.o(var2);
      this.p(var2);
      Style var3 = zava.eb(this.y);
      this.k(var3);
      this.j(var3);
      Style var4 = zava.ec(this.y);
      this.c(var4);
      Style var5 = zava.ed(this.y);
      Style var6 = zava.ee(this.y);
      Style var7 = zava.ef(this.y);
      Style var8 = zava.eg(this.y);
      Style var9 = zava.eh(this.y);
      Style var10 = zava.ei(this.y);
      Style var11 = zava.ej(this.y);
      Style var12 = zava.ek(this.y);
      Style var13 = zava.el(this.y);
      Style var14 = zava.em(this.y);
      this.a(var5, var6, var7, var8, var9, var10, var11, (Style)null, var12, var13, var14);
      Style var15 = zava.en(this.y);
      this.y(var15);
   }

   private void p() {
      Style var1 = zava.eo(this.y);
      this.n(var1);
      Style var2 = zava.ep(this.y);
      this.o(var2);
      this.p(var2);
      Style var3 = zava.eq(this.y);
      this.k(var3);
      Style var4 = zava.er(this.y);
      this.c(var4);
      Style var5 = zava.es(this.y);
      Style var6 = zava.et(this.y);
      Style var7 = zava.eu(this.y);
      this.b(var5, var6, var7);
      Style var8 = zava.ev(this.y);
      Style var9 = zava.ew(this.y);
      Style var10 = zava.ex(this.y);
      Style var11 = zava.ey(this.y);
      Style var12 = zava.ez(this.y);
      Style var13 = zava.eA(this.y);
      this.a(var8, (Style)null, (Style)null, var9, (Style)null, (Style)null, var10, (Style)null, var11, var12, var13);
      Style var14 = zava.eB(this.y);
      this.y(var14);
   }

   private void q() {
      Style var1 = zava.eC(this.y);
      this.o(var1);
      this.p(var1);
      Style var2 = zava.eD(this.y);
      this.k(var2);
      Style var3 = zava.eE(this.y);
      this.c(var3);
      Style var4 = zava.eF(this.y);
      Style var5 = zava.eG(this.y);
      Style var6 = zava.eH(this.y);
      this.a(var4, 19, var5, 21, var6, 20);
      Style var7 = zava.eI(this.y);
      Style var8 = zava.eJ(this.y);
      Style var9 = zava.eJ(this.y);
      Style var10 = zava.eK(this.y);
      Style var11 = zava.eL(this.y);
      Style var12 = zava.eM(this.y);
      Style var13 = zava.eN(this.y);
      this.a(var7, (Style)null, (Style)null, var8, (Style)null, var9, var10, (Style)null, var11, var12, var13);
      Style var14 = zava.eO(this.y);
      this.y(var14);
   }

   private void r() {
      Style var1 = zava.eP(this.y);
      this.o(var1);
      this.p(var1);
      Style var2 = zava.eQ(this.y);
      this.k(var2);
      Style var3 = zava.eR(this.y);
      this.c(var3);
      Style var4 = zava.eS(this.y);
      Style var5 = zava.eT(this.y);
      Style var6 = zava.eU(this.y);
      Style var7 = zava.eV(this.y);
      Style var8 = zava.eW(this.y);
      Style var9 = zava.eX(this.y);
      this.a(var4, var4, (Style)null, var5, var6, (Style)null, var7, var8, (Style)null, var9, (Style)null);
      Style var10 = zava.eY(this.y);
      this.y(var10);
   }

   private void s() {
      Style var1 = zava.fm(this.y);
      this.n(var1);
      Style var2 = zava.eZ(this.y);
      this.o(var2);
      this.p(var2);
      Style var3 = zava.fa(this.y);
      this.k(var3);
      Style var4 = zava.fb(this.y);
      this.c(var4);
      Style var5 = zava.fc(this.y);
      Style var6 = zava.fd(this.y);
      Style var7 = zava.fe(this.y);
      Style var8 = zava.ff(this.y);
      Style var9 = zava.fg(this.y);
      Style var10 = zava.fh(this.y);
      Style var11 = zava.fi(this.y);
      Style var12 = zava.fj(this.y);
      Style var13 = zava.fk(this.y);
      this.a(var5, (Style)null, var6, var7, var8, var9, var10, var10, var11, var12, var13);
      Style var14 = zava.fl(this.y);
      this.y(var14);
   }

   private void t() {
      Style var1 = zava.l(this.y);
      this.n(var1);
      Style var2 = zava.g(this.y);
      this.o(var2);
      Style var3 = zava.o(this.y);
      this.i(var3);
      Style var4 = zava.p(this.y);
      this.k(var4);
      Style var5 = zava.d(this.y);
      this.r(var5);
      Style var6 = zava.c(this.y);
      this.q(var6);
      Style var7 = zava.m(this.y);
      this.s(var7);
      Style var8 = zava.q(this.y);
      this.a(var8, var8, var8);
      Style var9 = zava.h(this.y);
      int var10 = this.c.o - this.c.k;
      byte var11 = 0;
      if (this.v > 0) {
         var11 = 1;
      }

      for(int var12 = var10; var12 < this.i; ++var12) {
         zda var13 = new zda();
         Style var14 = this.g(this.c.ad[var11][var12]);
         this.j[var11][var12] = zka.a(var14, var9, var13, 22, this.j[var11][var12]);
         this.c.ad[var11][var12] = this.c.ac.a(var14);
      }

      Style var28 = zava.i(this.y);
      Style var29 = zava.j(this.y);
      this.d(var28, var29, var29);
      Style var15 = zava.k(this.y);
      this.m(var1);
      Style var16 = zava.n(this.y);
      this.l(var16);
      boolean var17 = this.a(this.c.getRowFields());
      Style var18 = zava.a(this.y, var17);
      Style var19 = zava.b(this.y, var17);
      this.e(var18, var19, var18);
      Style var21 = zava.s(this.y);
      Style var22 = zava.t(this.y);
      Style var23 = zava.u(this.y);
      this.b(var21, var22, var23);
      Style var24;
      if (var17) {
         var24 = zava.cK(this.y);
         this.u(var24);
      }

      var24 = zava.e(this.y);
      this.b(var24);
      Style var25 = zava.w(this.y);
      this.v(var25);
      Style var26 = zava.v(this.y);
      this.t(var26);
      Style var27 = zava.x(this.y);
      this.y(var27);
   }

   private void u() {
      Style var1 = zava.A(this.y);
      this.n(var1);
      Style var2 = zava.z(this.y);
      this.r(var2);
      Style var3 = zava.y(this.y);
      this.q(var3);
      Style var4 = zava.B(this.y);
      this.i(var4);
      Style var5 = zava.C(this.y);
      this.k(var5);
      Style var6 = zava.D(this.y);
      this.s(var6);
      Style var7 = zava.H(this.y);
      this.a(var7, var7, var7);
      Style var8 = zava.E(this.y);
      int var9 = this.c.o - this.c.k;
      byte var10 = 0;
      if (this.v > 0) {
         var10 = 1;
      }

      for(int var11 = var9; var11 < this.i; ++var11) {
         zda var12 = new zda();
         Style var13 = this.g(this.c.ad[var10][var11]);
         this.j[var10][var11] = zka.a(var13, var8, var12, 22, this.j[var10][var11]);
         this.c.ad[var10][var11] = this.c.ac.a(var13);
      }

      Style var25 = zava.F(this.y);
      Style var26 = zava.G(this.y);
      this.d(var25, var26, var26);
      boolean var14 = this.a(this.c.getRowFields());
      Style var15 = zava.c(this.y, var14);
      Style var16 = zava.d(this.y, var14);
      this.e(var15, var16, var15);
      Style var18 = zava.I(this.y);
      this.l(var18);
      Style var19 = zava.N(this.y);
      this.v(var19);
      Style var20;
      if (var14) {
         var20 = zava.cK(this.y);
         this.u(var20);
      }

      var20 = zava.e(this.y);
      this.b(var20);
      Style var21 = zava.J(this.y);
      Style var22 = zava.K(this.y);
      Style var23 = zava.L(this.y);
      this.b(var21, var22, var23);
      Style var24 = zava.M(this.y);
      this.y(var24);
   }

   private void v() {
      Style var1 = zava.O(this.y);
      this.n(var1);
      Style var2 = zava.P(this.y);
      this.o(var2);
      Style var3 = zava.Q(this.y);
      this.q(var3);
      Style var4 = zava.R(this.y);
      this.s(var4);
      Style var5 = zava.S(this.y);
      this.k(var5);
      Style var6 = zava.T(this.y);
      this.i(var6);
      Style var7 = zava.U(this.y);
      this.d(var7, var7, var7);
      Style var10 = zava.V(this.y);
      this.l(var10);
      Style var11 = zava.W(this.y);
      Style var12 = zava.X(this.y);
      this.b(var11, var12, var12);
      Style var14 = zava.b(this.y);
      this.f(var14);
      Style var15 = zava.a(this.y);
      this.g(var15);
      Style var16 = zava.a(this.y);
      this.d(var16);
      Style var17 = zava.ac(this.y);
      this.y(var17);
      Style var18 = zava.ah(this.y);
      this.v(var18);
      Style var19 = zava.ag(this.y);
      this.a(var19, false);
      int var10000 = this.c.n - this.c.i;
      int var20;
      int var21;
      int var22;
      int var23;
      String var25;
      int[] var26;
      Style var27;
      Style var29;
      if (this.v >= 2) {
         var21 = this.c.o - this.c.k;
         var22 = var21;
         var23 = var21;

         for(boolean var24 = true; var22 < this.i; var22 = var23) {
            var25 = (String)this.p.get(var22 - var21);
            if (var25 != null && var25.startsWith("columnsubtitle")) {
               var26 = this.a(com.aspose.cells.b.a.zv.d(var25.substring("columnsubtitle".length()), '+'));
               if (var26[0] == 1) {
                  if (!var24) {
                     var24 = true;
                  } else {
                     var24 = false;

                     for(var23 = var22 + 1; var23 < this.i; ++var23) {
                        var25 = (String)this.p.get(var23 - var21);
                        if (var25 != null) {
                           if ("columnsubtotal1".equals(var25)) {
                              break;
                           }

                           if (var25.startsWith("columnsubtitle")) {
                              var26 = this.a(com.aspose.cells.b.a.zv.d(var25.substring("columnsubtitle".length()), '+'));
                              if (var26[0] == 1) {
                                 break;
                              }
                           }
                        }
                     }

                     if (var23 == this.i) {
                        var23 = this.i - 1;
                     }

                     var27 = zava.Y(this.y);
                     Style var28 = zava.Z(this.y);
                     var29 = zava.aa(this.y);
                     Style var30 = null;

                     for(int var31 = var22; var31 < var23; ++var31) {
                        zda var32 = new zda();
                        Style var33 = this.g(this.c.ad[1][var31]);
                        this.j[1][var31] = zka.a(var33, var27, var32, 3, this.j[1][var31]);
                        this.c.ad[1][var31] = this.c.ac.a(var33);
                        var20 = this.c.n - this.c.i;
                        var25 = (String)this.p.get(var31 - var21);
                        if (var25 != null && var25.startsWith("columnsubtitle")) {
                           var30 = var28;
                        } else {
                           var30 = var29;
                        }

                        for(int var34 = var20; var34 < this.h; ++var34) {
                           String var35 = (String)this.n.get(var34 - var20);
                           if (var35 == null || !"blank".equals(var35)) {
                              Style var36 = this.g(this.c.ad[var34][var31]);
                              this.j[var34][var31] = zka.a(var36, var30, var32, 3, this.j[var34][var31]);
                              this.c.ad[var34][var31] = this.c.ac.a(var36);
                           }
                        }
                     }
                  }
               }
            }

            ++var23;
         }
      }

      var20 = this.c.n - this.c.i;

      for(var21 = var20; var21 < this.h; ++var21) {
         String var37 = (String)this.n.get(var21 - var20);
         if (var37 != null && var37.startsWith("rowsubtitle")) {
            int[] var40 = this.a(com.aspose.cells.b.a.zv.d(var37.substring("rowsubtitle".length()), '+'));
            Style var39;
            int var42;
            zda var44;
            if (var40[0] == 1) {
               var39 = zava.ad(this.y);

               for(var42 = 0; var42 < this.i; ++var42) {
                  var44 = new zda();
                  var44.a = true;
                  var27 = this.g(this.c.ad[var21][var42]);
                  this.j[var21][var42] = zka.a(var27, var39, var44, a, this.j[var21][var42]);
                  this.c.ad[var21][var42] = this.c.ac.a(var27);
               }
            }

            if (var40[var40.length - 1] == this.u) {
               var39 = zava.ae(this.y);

               for(var42 = this.c.o - this.c.k; var42 < this.i; ++var42) {
                  var44 = new zda();
                  this.b(var44, var42, this.c.o - this.c.k, this.i - 1);
                  var44.b = true;
                  var27 = this.g(this.c.ad[var21][var42]);
                  this.j[var21][var42] = zka.a(var27, var39, var44, 0, this.j[var21][var42]);
                  this.c.ad[var21][var42] = this.c.ac.a(var27);
               }
            }
         }
      }

      Style var52;
      if (this.v >= 3) {
         var21 = this.c.o - this.c.k;
         var22 = var21;

         for(var23 = var21; var22 < this.i; var22 = var23) {
            String var41 = (String)this.p.get(var22 - var21);
            if (var41 != null && var41.startsWith("columnsubtitle")) {
               int[] var45 = this.a(com.aspose.cells.b.a.zv.d(var41.substring("columnsubtitle".length()), '+'));
               if (var45[0] == 2 || var45.length >= 2 && var45[1] == 2) {
                  for(var23 = var22 + 1; var23 < this.i; ++var23) {
                     var41 = (String)this.p.get(var23 - var21);
                     if (var41 != null) {
                        if ("columnsubtotal2".equals(var41)) {
                           break;
                        }

                        if (var41.startsWith("columnsubtitle")) {
                           var45 = this.a(com.aspose.cells.b.a.zv.d(var41.substring("columnsubtitle".length()), '+'));
                           if (var45[0] == 2 || var45.length >= 2 && var45[1] == 2) {
                              break;
                           }
                        }
                     }
                  }

                  if (var23 == this.i) {
                     var23 = this.i - 1;
                  }

                  Style var46 = zava.ab(this.y);

                  for(int var47 = var22; var47 < var23; ++var47) {
                     zda var48 = new zda();
                     var48.c = true;
                     var29 = this.g(this.c.ad[2][var47]);
                     this.j[1][var47] = zka.a(var29, var46, var48, a, this.j[1][var47]);
                     this.c.ad[2][var47] = this.c.ac.a(var29);
                     var20 = this.c.n - this.c.i;

                     for(int var51 = var20; var51 < this.h; ++var51) {
                        var52 = this.g(this.c.ad[var51][var47]);
                        this.j[var51][var47] = zka.a(var52, var46, var48, a, this.j[var51][var47]);
                        this.c.ad[var51][var47] = this.c.ac.a(var52);
                     }
                  }
               }
            }

            ++var23;
         }
      }

      if (this.u >= 3) {
         var21 = (this.u - 1) / 2;
         ArrayList var38 = new ArrayList();
         var23 = -1;

         int var43;
         for(var43 = 0; var43 < var21; ++var43) {
            var23 += 2;
            com.aspose.cells.b.a.a.ze.a(var38, (Object)var23);
         }

         for(var43 = var20; var43 < this.h; ++var43) {
            var25 = (String)this.n.get(var43 - var20);
            if (var25 != null && var25.startsWith("rowsubtitle")) {
               var26 = this.a(com.aspose.cells.b.a.zv.d(var25.substring("rowsubtitle".length()), '+'));
               boolean var49 = false;

               for(int var50 = 0; var50 < var26.length; ++var50) {
                  var49 = false;
                  if (var26[var50] - 1 == 0) {
                     var49 = true;
                  }

                  if (var38.contains(var26[var50] - 1)) {
                     var49 = true;
                  }

                  if (var49) {
                     var29 = zava.af(this.y);
                     zda var53 = new zda();
                     var53.c = true;
                     var52 = this.g(this.c.ad[var43][var26[var50] - 1]);
                     this.j[var43][var26[var50] - 1] = zka.a(var52, var29, var53, a, this.j[var43][var26[var50] - 1]);
                     this.c.ad[var43][var26[var50] - 1] = this.c.ac.a(var52);
                  }
               }
            }
         }
      }

   }

   private void w() {
      Style var1 = zava.ai(this.y);
      this.n(var1);
      Style var2 = zava.aj(this.y);
      this.o(var2);
      Style var3 = zava.c(this.y);
      this.q(var3);
      Style var4 = zava.ak(this.y);
      this.s(var4);
      Style var5 = zava.al(this.y);
      this.k(var5);
      Style var6 = zava.am(this.y);
      this.i(var6);
      Style var7 = zava.an(this.y);
      this.d(var7, var7, var7);
      Object var10 = null;
      Style var11 = zava.av(this.y);
      Object var12 = null;
      this.e((Style)var10, var11, (Style)var12);
      Style var13 = zava.ao(this.y);
      this.l(var13);
      Style var14 = zava.ap(this.y);
      Style var15 = zava.aq(this.y);
      Object var16 = null;
      this.b(var14, var15, (Style)var16);
      Style var17 = zava.ar(this.y);
      this.t(var17);
      Style var18 = zava.r(this.y);
      this.h(var18);
      Style var19 = zava.as(this.y);
      this.y(var19);
      Style var20 = zava.au(this.y);
      this.v(var20);
      Style var21 = zava.at(this.y);
      this.a(var21, false);
      int var22 = this.c.n - this.c.i;
      int var23;
      if (this.v >= 2) {
         var23 = this.c.o - this.c.k;
         int var24 = var23;
         int var25 = var23;
         boolean var26 = false;

         for(Style var27 = zava.ay(this.y); var24 < this.i; var24 = var25) {
            String var28 = (String)this.p.get(var24 - var23);
            if (var28 != null && var28.startsWith("columnsubtitle")) {
               int[] var29 = this.a(com.aspose.cells.b.a.zv.d(var28.substring("columnsubtitle".length()), '+'));
               if (var29[0] != 1) {
                  this.a(var27, var22, var24, false);
               } else if (!var26) {
                  this.a(var27, var22, var24, true);
                  var26 = true;
               } else {
                  var26 = false;

                  for(var25 = var24 + 1; var25 < this.i; ++var25) {
                     var28 = (String)this.p.get(var25 - var23);
                     if (var28 != null) {
                        if ("columnsubtotal1".equals(var28)) {
                           break;
                        }

                        if (var28.startsWith("columnsubtitle")) {
                           var29 = this.a(com.aspose.cells.b.a.zv.d(var28.substring("columnsubtitle".length()), '+'));
                           if (var29[0] == 1) {
                              break;
                           }
                        }
                     }
                  }

                  if (var25 == this.i) {
                     var25 = this.i - 1;
                  }

                  Style var30 = zava.aw(this.y);
                  Style var31 = zava.ax(this.y);
                  Style var32 = null;

                  for(int var33 = var24; var33 < var25; ++var33) {
                     if (var33 == var24) {
                        this.a(var27, var22, var33, true);
                     } else {
                        this.a(var27, var22, var33, false);
                     }

                     zda var34 = new zda();
                     Style var35 = this.g(this.c.ad[1][var33]);
                     this.j[1][var33] = zka.a(var35, var30, var34, 3, this.j[1][var33]);
                     this.c.ad[1][var33] = this.c.ac.a(var35);
                     var28 = (String)this.p.get(var33 - var23);
                     if (var28 != null && var28.startsWith("columnsubtitle")) {
                        var32 = var31;
                     } else {
                        var32 = var30;
                     }

                     var22 = this.c.n - this.c.i;

                     for(int var36 = var22; var36 < this.h; ++var36) {
                        String var37 = (String)this.n.get(var36 - var22);
                        if (var37 == null || !"blank".equals(var37) && !"rowsubtotal1".equals(var37)) {
                           Style var38 = this.g(this.c.ad[var36][var33]);
                           this.j[var36][var33] = zka.a(var38, var32, var34, 3, this.j[var36][var33]);
                           this.c.ad[var36][var33] = this.c.ac.a(var38);
                        }
                     }
                  }

                  this.a(var27, var22, var25, false);
               }
            } else {
               this.a(var27, var22, var24, false);
            }

            ++var25;
         }
      }

      for(var23 = var22; var23 < this.h; ++var23) {
         String var39 = (String)this.n.get(var23 - var22);
         if (var39 != null && var39.startsWith("rowsubtitle")) {
            int[] var41 = this.a(com.aspose.cells.b.a.zv.d(var39.substring("rowsubtitle".length()), '+'));
            if (var41[0] == 1) {
               Style var40 = zava.az(this.y);

               for(int var42 = 0; var42 < this.i; ++var42) {
                  zda var43 = new zda();
                  var43.a = true;
                  Style var44 = this.g(this.c.ad[var23][var42]);
                  this.j[var23][var42] = zka.a(var44, var40, var43, a, this.j[var23][var42]);
                  this.c.ad[var23][var42] = this.c.ac.a(var44);
               }
            }
         }
      }

   }

   private void x() {
      Style var1 = zava.aA(this.y);
      this.o(var1);
      Style var2 = zava.aB(this.y);
      this.p(var2);
      Style var3 = zava.aC(this.y);
      this.s(var3);
      Style var4 = zava.aI(this.y);
      this.k(var4);
      Style var5 = zava.aJ(this.y);
      this.i(var5);
      Style var6 = zava.aD(this.y);
      this.a(var6, var6, var6);
      Style var9 = zava.aE(this.y);
      int var10 = this.c.o - this.c.k;
      byte var11 = 0;
      if (this.v > 0) {
         var11 = 1;
      }

      Style var16;
      for(int var12 = var10; var12 < this.i; ++var12) {
         boolean var13 = false;
         String var14 = (String)this.p.get(var12 - var10);
         if (var14 != null) {
            if (var14.startsWith("columnsubtitle")) {
               int[] var15 = this.a(com.aspose.cells.b.a.zv.d(var14.substring("columnsubtitle".length()), '+'));
               if (var15[0] == 1) {
                  var13 = true;
               }
            } else if ("columnsubtotal1".equals(var14)) {
               var13 = true;
            } else if ("grandtotalcolumn".equals(var14)) {
               var13 = true;
            }
         }

         if (var13) {
            zda var31 = new zda();
            var16 = this.g(this.c.ad[var11][var12]);
            this.j[var11][var12] = zka.a(var16, var9, var31, 22, this.j[var11][var12]);
            this.c.ad[var11][var12] = this.c.ac.a(var16);
         }
      }

      Style var29 = zava.aF(this.y);
      Style var30 = zava.aG(this.y);
      this.d(var29, var30, var30);
      Style var32 = zava.aH(this.y);
      this.m(var32);
      var16 = zava.aK(this.y);
      this.e(var16, (Style)null, (Style)null);
      Style var17;
      Style var20;
      if (this.u > 1) {
         var10 = this.c.o - 1 - this.c.k;
         int var28 = this.c.n - this.c.i - 1;
         var17 = zava.aP(this.y);

         for(int var18 = var10; var18 < this.i; ++var18) {
            zda var19 = new zda();
            var19.b = true;
            var20 = this.g(this.c.ad[var28][var18]);
            this.j[var28][var18] = zka.a(var20, var17, var19, 22, this.j[var28][var18]);
            this.c.ad[var28][var18] = this.c.ac.a(var20);
         }
      }

      var17 = zava.a(this.y);
      this.g(var17);
      Style var33 = zava.a(this.y);
      this.d(var33);
      Style var34 = zava.aL(this.y);
      this.b(var34, (Style)null, (Style)null);
      var20 = zava.aM(this.y);
      this.c((Style)null, var20, var20);
      var10 = this.c.o - this.c.k;
      int var21 = this.c.n - this.c.i;
      Style var22 = zava.b(this.y, 1);
      Style var23 = zava.b(this.y, 2);
      Style var24 = zava.b(this.y, 5);
      this.a(var22, var21, var10, true);
      if (this.v > 1) {
         for(int var25 = var10; var25 < this.i; ++var25) {
            String var26 = (String)this.p.get(var25 - var10);
            if (var26 != null && var26.startsWith("columnsubtitle")) {
               int[] var27 = this.a(com.aspose.cells.b.a.zv.d(var26.substring("columnsubtitle".length()), '+'));
               if (var27[0] == 1) {
                  this.a(var23, 1, var25, true);
               }

               if (var27[0] == 2 || var27.length >= 2 && var27[1] == 2) {
                  this.a(var24, 2, var25, true);
               }
            }
         }
      }

      Style var35 = zava.aN(this.y);
      this.v(var35);
      Style var36 = zava.aO(this.y);
      this.y(var36);
   }

   private void y() {
      Style var1 = zava.aQ(this.y);
      this.n(var1);
      Style var2 = zava.aR(this.y);
      this.o(var2);
      this.p(var2);
      Style var3 = zava.aS(this.y);
      this.q(var3);
      Style var4 = zava.aT(this.y);
      this.s(var4);
      Style var5 = zava.aU(this.y);
      this.k(var5);
      Style var6 = zava.aV(this.y);
      this.i(var6);
      Style var7 = zava.aW(this.y);
      int var8 = this.c.o - this.c.k;
      byte var9 = 0;
      if (this.v > 0) {
         var9 = 1;
      }

      Style var12;
      for(int var10 = var8; var10 < this.i; ++var10) {
         zda var11 = new zda();
         var12 = this.g(this.c.ad[var9][var10]);
         this.j[var9][var10] = zka.a(var12, var7, var11, 22, this.j[var9][var10]);
         this.c.ad[var9][var10] = this.c.ac.a(var12);
      }

      Style var24 = zava.aX(this.y);
      this.a(var24, var24, var24);
      Style var25 = zava.aY(this.y);
      this.a(var25, true);
      var12 = zava.aZ(this.y);
      this.e(var12, var12, var12);
      Style var13 = zava.ba(this.y);
      Style var14 = zava.bb(this.y);
      this.b(var13, var14, var14);
      boolean var15 = this.a(this.c.getRowFields());
      Style var16;
      if (var15) {
         var16 = zava.cK(this.y);
         this.u(var16);
      }

      var16 = zava.bg(this.y);
      this.t(var16);
      Style var17 = zava.bd(this.y);
      this.y(var17);
      Style var18 = zava.bc(this.y);
      this.v(var18);
      if (this.v > 1) {
         Style var19 = zava.be(this.y);
         Style var20 = zava.bf(this.y);
         var8 = this.c.o - this.c.k;

         for(int var21 = var8; var21 < this.i; ++var21) {
            String var22 = (String)this.p.get(var21 - var8);
            if (var22 != null) {
               if (var22.startsWith("columnsubtitle")) {
                  int[] var23 = this.a(com.aspose.cells.b.a.zv.d(var22.substring("columnsubtitle".length()), '+'));
                  if (var23[0] == 1) {
                     this.a(var19, 1, var21, true);
                  }
               } else if ("grandtotalcolumn".equals(var22)) {
                  this.a(var19, 1, var21, true);
               } else if ("columnsubtotal1".equals(var22)) {
                  this.a(var20, 1, var21, true);
               }
            }
         }
      }

   }

   private void z() {
      Style var1 = zava.bh(this.y);
      this.o(var1);
      this.p(var1);
      Style var2 = zava.bi(this.y);
      this.s(var2);
      Style var3 = zava.bj(this.y);
      this.k(var3);
      Style var4 = zava.bk(this.y);
      this.i(var4);
      Style var5;
      Style var11;
      if (this.v >= 2) {
         var5 = zava.bl(this.y);
         int var6 = this.c.o - this.c.k;
         byte var7 = 1;

         for(int var8 = var6; var8 < this.i; ++var8) {
            String var9 = (String)this.p.get(var8 - var6);
            if (var9 == null || !"columnsubtotal1".equals(var9) && !"grandtotalcolumn".equals(var9)) {
               zda var10 = new zda();
               var11 = this.g(this.c.ad[var7][var8]);
               this.j[var7][var8] = zka.a(var11, var5, var10, 22, this.j[var7][var8]);
               this.c.ad[var7][var8] = this.c.ac.a(var11);
            }
         }
      }

      var5 = zava.bm(this.y);
      this.d(var5, var5, var5);
      Style var31 = zava.bn(this.y);
      this.m(var31);
      Style var32 = zava.bo(this.y);
      Style var33 = zava.bp(this.y);
      Style var34 = zava.bq(this.y);
      this.b(var32, var33, var34);
      boolean var35 = this.a(this.c.getRowFields());
      var11 = zava.e(this.y, var35);
      Style var12 = zava.f(this.y, var35);
      this.e(var11, var11, var12);
      Style var13 = zava.b(this.y);
      this.f(var13);
      Style var14 = zava.bu(this.y);
      this.y(var14);
      Style var15 = zava.bt(this.y);
      this.b(var15, false);
      Style var16 = zava.bs(this.y);
      this.v(var16);
      Style var17 = zava.br(this.y);
      this.a(var17, false);
      Style var18 = zava.bv(this.y);
      if (this.u > 1) {
         this.a(var18, this.c.n - this.c.i, 0, true);
      }

      if (this.v > 1) {
         int var19 = this.c.o - this.c.k;

         for(int var20 = var19; var20 < this.i; ++var20) {
            String var21 = (String)this.p.get(var20 - var19);
            if (var21 != null) {
               if (var21.startsWith("columnsubtitle")) {
                  int[] var22 = this.a(com.aspose.cells.b.a.zv.d(var21.substring("columnsubtitle".length()), '+'));
                  if (var22[0] == 1) {
                     this.a(var18, 1, var20, true);
                  }
               } else if ("columnsubtotal1".equals(var21)) {
                  this.a(var18, 1, var20, true);
               }
            }
         }
      }

      Style var36 = zava.bz(this.y);
      this.t(var36);
      Style var37;
      if (var35) {
         var37 = zava.cK(this.y);
         this.u(var37);
      }

      var37 = zava.bw(this.y);
      this.e(var37);
      int var38 = this.c.n - this.c.i;

      int var26;
      int var39;
      for(var39 = var38; var39 < this.h; ++var39) {
         String var23 = (String)this.n.get(var39 - var38);
         if (var23 != null && var23.startsWith("rowsubtitle")) {
            int[] var24 = this.a(com.aspose.cells.b.a.zv.d(var23.substring("rowsubtitle".length()), '+'));
            if (var24[0] == 1 && this.u > 1 && var24[var24.length - 1] == this.u) {
               Style var25 = zava.bx(this.y);
               var26 = this.c.o - 1 - this.c.k;
               zda var27 = new zda();
               var27.c = true;
               Style var28 = this.g(this.c.ad[var39][var26]);
               this.j[var39][var26] = zka.a(var28, var25, var27, a, this.j[var39][var26]);
               this.c.ad[var39][var26] = this.c.ac.a(var28);
            }
         }
      }

      if (this.u > 2 && this.v > 2) {
         var38 = this.c.n - this.c.i;
         var39 = this.c.o - this.c.k;
         var18 = zava.by(this.y);

         for(int var40 = var38; var40 < this.h; ++var40) {
            String var41 = (String)this.n.get(var40 - var38);
            if (var41 != null && var41.startsWith("rowsubtotal")) {
               int var42 = com.aspose.cells.b.a.zo.a(var41.substring("rowsubtotal".length()));
               if (var42 != 1) {
                  for(var26 = var39; var26 < this.i; ++var26) {
                     String var43 = (String)this.p.get(var26 - var39);
                     if (var43 != null && var43.startsWith("columnsubtotal")) {
                        int var44 = com.aspose.cells.b.a.zo.a(var43.substring("columnsubtotal".length()));
                        if (var44 != 1) {
                           zda var29 = new zda();
                           var29.c = true;
                           Style var30 = this.g(this.c.ad[var40][var26]);
                           this.j[var40][var26] = zka.a(var30, var18, var29, a, this.j[var40][var26]);
                           this.c.ad[var40][var26] = this.c.ac.a(var30);
                        }
                     }
                  }
               }
            }
         }
      }

   }

   private void A() {
      Style var1 = zava.bA(this.y);
      this.o(var1);
      this.p(var1);
      int var2 = this.c.n - this.c.i;
      int var3 = this.c.o - this.c.k;
      Style var4 = zava.bM(this.y);
      this.a(var4, var2, var3, true);
      this.a(var4, var2, 0, true);
      Style var5 = zava.bB(this.y);
      this.k(var5);
      Style var6 = zava.bC(this.y);
      if (this.v == 1) {
         var6 = zava.bD(this.y);
      }

      Style var7 = zava.bE(this.y);
      this.d(var6, var7, var7);
      Style var8 = zava.bF(this.y);
      this.a(var8, true);
      Style var9 = zava.bG(this.y);
      this.a(var9, var9, var9);
      Style var10 = zava.bH(this.y);
      Style var11 = zava.bI(this.y);
      this.b(var10, var11, var11);
      boolean var12 = this.a(this.c.getRowFields());
      Style var13 = zava.g(this.y, var12);
      this.e(var13, var13, var13);
      Style var14 = zava.bQ(this.y);
      this.t(var14);
      Style var15 = zava.b(this.y);
      this.f(var15);
      Style var16 = zava.bJ(this.y);
      this.y(var16);
      Style var17 = zava.bL(this.y);
      this.v(var17);
      Style var18 = zava.bK(this.y);
      this.w(var18);
      Style var19;
      if (var12) {
         var19 = zava.cK(this.y);
         this.u(var19);
      }

      if (this.v > 1) {
         var4 = zava.bN(this.y);
         var19 = zava.bO(this.y);
         Style var20 = zava.bP(this.y);
         int var21 = this.c.n - this.c.i;
         if (this.v > 1) {
            var3 = this.c.o - this.c.k;

            for(int var22 = var3; var22 < this.i; ++var22) {
               String var23 = (String)this.p.get(var22 - var3);
               if (var23 != null) {
                  if (!var23.startsWith("columnsubtitle")) {
                     if ("columnsubtotal1".equals(var23)) {
                        this.a(var4, 1, var22, true);
                     }
                  } else {
                     int[] var24 = this.a(com.aspose.cells.b.a.zv.d(var23.substring("columnsubtitle".length()), '+'));
                     if (var24[0] == 1) {
                        this.a(var4, 1, var22, true);
                     }

                     Style var25 = null;
                     zda var26;
                     if (this.v >= 3 && var24[1] == 2) {
                        var26 = new zda();
                        var26.c = true;
                        var25 = this.g(this.c.ad[2][var22]);
                        this.j[2][var22] = zka.a(var25, var19, var26, a, this.j[2][var22]);
                        this.c.ad[2][var22] = this.c.ac.a(var25);
                     }

                     if (this.v >= 4 && (var24[2] == 3 || var24[1] == 3)) {
                        var26 = new zda();
                        var26.c = true;
                        var25 = this.g(this.c.ad[3][var22]);
                        this.j[3][var22] = zka.a(var25, var20, var26, a, this.j[3][var22]);
                        this.c.ad[3][var22] = this.c.ac.a(var25);
                     }

                     if (this.v >= 3 && var24[0] == 2) {
                        var26 = new zda();
                        var26.c = true;
                        var25 = this.g(this.c.ad[2][var22]);
                        this.j[2][var22] = zka.a(var25, var19, var26, a, this.j[2][var22]);
                        this.c.ad[2][var22] = this.c.ac.a(var25);
                        this.a(var19, var21, var22, true);
                     }

                     if (this.v >= 4 && var24[0] == 3) {
                        var26 = new zda();
                        var26.c = true;
                        var25 = this.g(this.c.ad[3][var22]);
                        this.j[3][var22] = zka.a(var25, var20, var26, a, this.j[3][var22]);
                        this.c.ad[3][var22] = this.c.ac.a(var25);
                        this.a(var20, var21, var22, true);
                     }
                  }
               }
            }
         }
      }

   }

   private void B() {
      Style var1 = zava.bR(this.y);
      this.o(var1);
      this.p(var1);
      Style var2 = zava.f(this.y);
      this.r(var2);
      Style var3 = zava.bS(this.y);
      this.s(var3);
      Style var4 = zava.bT(this.y);
      this.k(var4);
      Style var5 = zava.bU(this.y);
      this.i(var5);
      int var6 = this.c.o - this.c.k;
      Style var7;
      Style var13;
      if (this.v >= 2) {
         var7 = zava.bV(this.y);
         byte var8 = 1;

         for(int var9 = var6; var9 < this.i; ++var9) {
            String var10 = (String)this.p.get(var9 - var6);
            if (var10 != null && var10.startsWith("columnsubtitle")) {
               int[] var11 = this.a(com.aspose.cells.b.a.zv.d(var10.substring("columnsubtitle".length()), '+'));
               if (var11[0] == 1) {
                  zda var12 = new zda();
                  var13 = this.g(this.c.ad[var8][var9]);
                  this.j[var8][var9] = zka.a(var13, var7, var12, 22, this.j[var8][var9]);
                  this.c.ad[var8][var9] = this.c.ac.a(var13);
               }
            }
         }
      }

      var7 = zava.bW(this.y);
      Style var30 = zava.bX(this.y);
      this.d(var7, var30, var30);
      Style var31 = zava.ci(this.y);
      this.t(var31);
      Style var32 = zava.bY(this.y);
      this.m(var32);
      Style var33 = zava.bZ(this.y);
      this.a(var33, var33, var33);
      int var34 = this.c.n - this.c.i;
      var6 = this.c.o - this.c.k;
      var13 = zava.ca(this.y);
      this.a(var13, var34, var6, true);
      this.a(var13, var34, 0, true);
      Style var14 = zava.cb(this.y);
      Style var15 = zava.cc(this.y);
      Style var16 = zava.cd(this.y);
      this.b(var14, var15, var16);
      boolean var17 = this.a(this.c.getRowFields());
      Style var18 = zava.h(this.y, var17);
      Style var19 = zava.i(this.y, var17);
      this.e(var18, var19, var19);
      Style var20;
      if (var17) {
         var20 = zava.cK(this.y);
         this.u(var20);
      }

      var20 = zava.b(this.y);
      this.f(var20);
      Style var21 = zava.cg(this.y);
      this.y(var21);
      Style var22 = zava.cf(this.y);
      this.v(var22);
      Style var23 = zava.ce(this.y);
      this.a(var23, false);
      if (this.v > 1) {
         Style var24 = zava.ch(this.y);
         var6 = this.c.o - this.c.k;

         for(int var25 = var6; var25 < this.i; ++var25) {
            String var26 = (String)this.p.get(var25 - var6);
            if (var26 != null) {
               if (var26.startsWith("columnsubtitle")) {
                  int[] var27 = this.a(com.aspose.cells.b.a.zv.d(var26.substring("columnsubtitle".length()), '+'));
                  if (var27[0] != this.v) {
                     this.a(var24, var27[0], var25, true);
                  } else {
                     zda var28 = new zda();
                     var28.c = true;
                     Style var29 = this.g(this.c.ad[var27[0]][var25]);
                     this.j[var27[0]][var25] = zka.a(var29, var24, var28, a, this.j[var27[0]][var25]);
                     this.c.ad[var27[0]][var25] = this.c.ac.a(var29);
                  }
               } else if ("columnsubtotal1".equals(var26)) {
                  this.a(var24, 1, var25, true);
               }
            }
         }
      }

   }

   private void C() {
      Style var1 = zava.cj(this.y);
      this.o(var1);
      this.p(var1);
      Style var2 = zava.ck(this.y);
      this.s(var2);
      Style var3 = zava.cl(this.y);
      this.k(var3);
      Style var4 = zava.cm(this.y);
      this.i(var4);
      Style var5 = zava.cn(this.y);
      int var6 = this.c.o - this.c.k;
      byte var7 = 0;
      if (this.v > 0) {
         var7 = 1;
      }

      Style var10;
      for(int var8 = var6; var8 < this.i; ++var8) {
         zda var9 = new zda();
         var10 = this.g(this.c.ad[var7][var8]);
         this.j[var7][var8] = zka.a(var10, var5, var9, 22, this.j[var7][var8]);
         this.c.ad[var7][var8] = this.c.ac.a(var10);
      }

      Style var29 = zava.co(this.y);
      this.d(var29, var29, var29);
      Style var30 = zava.cp(this.y);
      this.t(var30);
      var10 = zava.cq(this.y);
      this.m(var10);
      Style var11 = zava.cr(this.y);
      this.a(var11, var11, var11);
      int var12 = this.c.n - this.c.i;
      var6 = this.c.o - this.c.k;
      Style var13 = zava.cs(this.y);
      this.a(var13, var12, var6, true);
      this.a(var13, var12, 0, true);
      Style var14 = zava.ct(this.y);
      Style var15 = zava.cu(this.y);
      this.b(var14, var15, var15);
      boolean var16 = this.a(this.c.getRowFields());
      Style var17 = zava.j(this.y, var16);
      this.e(var17, var17, var17);
      Style var18;
      if (var16) {
         var18 = zava.cK(this.y);
         this.u(var18);
      }

      var18 = zava.b(this.y);
      this.f(var18);
      Style var19 = zava.cv(this.y);
      this.y(var19);
      Style var20 = zava.cw(this.y);
      this.v(var20);
      if (this.v > 1) {
         var13 = zava.cs(this.y);
         Style var21 = zava.cx(this.y);
         Style var22 = zava.cy(this.y);
         int var28 = this.c.n - this.c.i;
         if (this.v > 1) {
            var6 = this.c.o - this.c.k;

            for(int var23 = var6; var23 < this.i; ++var23) {
               String var24 = (String)this.p.get(var23 - var6);
               if (var24 != null) {
                  if (!var24.startsWith("columnsubtitle")) {
                     if ("columnsubtotal1".equals(var24)) {
                        this.a(var13, 1, var23, true);
                     }
                  } else {
                     int[] var25 = this.a(com.aspose.cells.b.a.zv.d(var24.substring("columnsubtitle".length()), '+'));
                     if (var25[0] == 1) {
                        this.a(var13, 1, var23, true);
                     }

                     Style var26 = null;
                     zda var27;
                     if (this.v >= 3 && var25[1] == 2) {
                        var27 = new zda();
                        var27.c = true;
                        var26 = this.g(this.c.ad[2][var23]);
                        this.j[2][var23] = zka.a(var26, var21, var27, a, this.j[2][var23]);
                        this.c.ad[2][var23] = this.c.ac.a(var26);
                     }

                     if (this.v >= 4 && (var25[2] == 3 || var25[1] == 3)) {
                        var27 = new zda();
                        var27.c = true;
                        var26 = this.g(this.c.ad[3][var23]);
                        this.j[3][var23] = zka.a(var26, var22, var27, a, this.j[3][var23]);
                        this.c.ad[3][var23] = this.c.ac.a(var26);
                     }

                     if (this.v >= 3 && var25[0] == 2) {
                        var27 = new zda();
                        var27.c = true;
                        var26 = this.g(this.c.ad[2][var23]);
                        this.j[2][var23] = zka.a(var26, var21, var27, a, this.j[2][var23]);
                        this.c.ad[2][var23] = this.c.ac.a(var26);
                        this.a(var21, var28, var23, true);
                     }

                     if (this.v >= 4 && var25[0] == 3) {
                        var27 = new zda();
                        var27.c = true;
                        var26 = this.g(this.c.ad[3][var23]);
                        this.j[3][var23] = zka.a(var26, var22, var27, a, this.j[3][var23]);
                        this.c.ad[3][var23] = this.c.ac.a(var26);
                        this.a(var22, var28, var23, true);
                     }
                  }
               }
            }
         }
      }

   }

   private void D() {
      Style var1 = zava.cz(this.y);
      this.n(var1);
      Style var2 = zava.cA(this.y);
      this.o(var2);
      Style var3 = zava.cB(this.y);
      this.s(var3);
      Style var4 = zava.d(this.y);
      this.r(var4);
      Style var5 = zava.c(this.y);
      this.q(var5);
      Style var6 = zava.cC(this.y);
      this.k(var6);
      Style var7 = zava.cD(this.y);
      this.i(var7);
      Style var8 = zava.cE(this.y);
      this.d(var8, var8, var8);
      Style var9 = zava.cF(this.y);
      this.t(var9);
      Style var10 = zava.cG(this.y);
      this.a(var10, var10, var10);
      Style var11 = zava.cH(this.y);
      this.b(var11, var11, var11);
      boolean var12 = this.a(this.c.getRowFields());
      Style var13 = zava.k(this.y, var12);
      this.e(var13, var13, var13);
      Style var14;
      if (var12) {
         var14 = zava.cK(this.y);
         this.u(var14);
      }

      var14 = zava.cI(this.y);
      this.y(var14);
      Style var15 = zava.cJ(this.y);
      this.v(var15);
      Style var16 = zava.e(this.y);
      this.b(var16);
   }

   private void E() {
      Style var1 = zava.cL(this.y);
      this.o(var1);
      this.p(var1);
   }

   private void b(Style var1) {
      if (this.v > 1) {
         int var2 = this.c.o - this.c.k;

         for(int var3 = var2; var3 < this.i; ++var3) {
            String var4 = (String)this.p.get(var3 - var2);
            if (var4 != null && var4.startsWith("columnsubtitle")) {
               int[] var5 = this.a(com.aspose.cells.b.a.zv.d(var4.substring("columnsubtitle".length()), '+'));
               if (var5[0] == 1) {
                  this.a(var1, 1, var3, true);
               }
            }
         }
      }

   }

   private void c(Style var1) {
      zda var2 = new zda();
      var2.a = true;
      var2.b = true;
      var2.c = true;
      var2.d = true;
      Style var3 = this.g(this.c.ad[0][this.i - 1]);
      this.j[0][this.i - 1] = zka.a(var3, var1, var2, a, this.j[0][this.i - 1]);
      this.c.ad[0][this.i - 1] = this.c.ac.a(var3);
   }

   private void d(Style var1) {
      if (this.u > 0) {
         int var2 = this.c.o - 1 - this.c.k;
         int var3 = this.c.n - this.c.i;

         for(int var4 = var3; var4 < this.i; ++var4) {
            String var5 = (String)this.n.get(var4 - var3);
            if (var5 != null && var5.startsWith("rowsubtitle")) {
               int[] var6 = this.a(com.aspose.cells.b.a.zv.d(var5.substring("rowsubtitle".length()), '+'));
               if (var6[var6.length - 1] == this.u) {
                  zda var7 = new zda();
                  Style var8 = this.g(this.c.ad[var4][var2]);
                  this.j[var4][var2] = zka.a(var8, var1, var7, a, this.j[var4][var2]);
                  this.c.ad[var4][var2] = this.c.ac.a(var8);
               }
            }
         }
      }

   }

   private void e(Style var1) {
      if (this.u > 1) {
         int var2 = this.c.n - this.c.i;

         for(int var3 = var2; var3 < this.h; ++var3) {
            String var4 = (String)this.n.get(var3 - var2);
            if (var4 != null && var4.startsWith("rowsubtitle")) {
               int[] var5 = this.a(com.aspose.cells.b.a.zv.d(var4.substring("rowsubtitle".length()), '+'));
               if (var5[0] == 1) {
                  for(int var6 = 0; var6 < this.i; ++var6) {
                     zda var7 = new zda();
                     var7.a = true;
                     Style var8 = this.g(this.c.ad[var3][var6]);
                     this.j[var3][var6] = zka.a(var8, var1, var7, a, this.j[var3][var6]);
                     this.c.ad[var3][var6] = this.c.ac.a(var8);
                  }
               }
            }
         }
      }

   }

   private void f(Style var1) {
      int var2 = this.c.o - this.c.k;
      int var3 = this.c.n - this.c.i;

      for(int var4 = var2; var4 < this.i; ++var4) {
         String var5 = (String)this.p.get(var4 - var2);
         if (var5 != null && var5.startsWith("columnsubtitle")) {
            for(int var6 = var3; var6 < this.h; ++var6) {
               zda var7 = new zda();
               Style var8 = this.g(this.c.ad[var6][var4]);
               this.j[var6][var4] = zka.a(var8, var1, var7, a, this.j[var6][var4]);
               this.c.ad[var6][var4] = this.c.ac.a(var8);
            }
         }
      }

   }

   private void g(Style var1) {
      int var2 = this.c.o - this.c.k;
      int var3 = this.c.n - this.c.i;

      for(int var4 = var2; var4 < this.i; ++var4) {
         for(int var5 = var3; var5 < this.h; ++var5) {
            String var6 = (String)this.n.get(var5 - var3);
            if (var6 == null || !var6.startsWith("rowsubtotal") && !"grandtotalrow".equals(var6)) {
               zda var7 = new zda();
               Style var8 = this.g(this.c.ad[var5][var4]);
               this.j[var5][var4] = zka.a(var8, var1, var7, a, this.j[var5][var4]);
               this.c.ad[var5][var4] = this.c.ac.a(var8);
            }
         }
      }

   }

   private void a(Style var1, int var2, int var3, boolean var4) {
      int var5 = this.h - 1;
      if (!var4 && this.c.getColumnGrand()) {
         if (this.q == 1) {
            if (this.u > 1) {
               var5 -= this.w;
            }
         } else {
            --var5;
         }
      }

      for(int var6 = var2; var6 <= var5; ++var6) {
         zda var7 = new zda();
         var7.c = true;
         Style var8 = this.g(this.c.ad[var6][var3]);
         this.j[var6][var3] = zka.a(var8, var1, var7, a, this.j[var6][var3]);
         this.c.ad[var6][var3] = this.c.ac.a(var8);
      }

   }

   private boolean a(PivotFieldCollection var1) {
      for(int var2 = 0; var2 < var1.getCount(); ++var2) {
         if (var1.get(var2).getShowInOutlineForm()) {
            return false;
         }
      }

      return true;
   }

   private int a(int var1) {
      if (this.x == this.c.getPageFieldWrapCount()) {
         return var1 - 1;
      } else {
         boolean var2 = false;
         boolean var3 = var1 % this.c.getPageFieldWrapCount() != 0;
         int var4 = var1 / this.c.getPageFieldWrapCount();
         int var5;
         if (this.c.getPageFieldOrder() == 0) {
            if (var3) {
               var5 = var4 * this.c.getPageFieldWrapCount() + var1 % this.c.getPageFieldWrapCount() - 1;
            } else {
               var5 = -1;
            }
         } else if (var4 == 0) {
            var5 = -1;
         } else {
            var5 = var1 - this.c.getPageFieldWrapCount();
         }

         return var5;
      }
   }

   private void a(int[][] var1, int[][] var2, int var3, int var4) {
      Style var5 = null;
      Style var6 = null;
      boolean var7 = true;

      int var8;
      int var9;
      for(var8 = 1; var8 < var3; ++var8) {
         int var10 = this.a(var8);
         if (var10 != -1) {
            for(var9 = 0; var9 < var4; ++var9) {
               var5 = this.g(var1[var8][var9]);
               if (var5.isModified(4) && zka.a(var2[var8][var9], 4) > zka.a(var2[var10][var9], 8)) {
                  var6 = this.g(var1[var10][var9]);
                  var6.getBorders().getByBorderType(8).a(var5.getBorders().getByBorderType(4));
                  var6.b(5);
                  var1[var10][var9] = this.c.ac.a(var6);
               }

               var5 = this.g(var1[var10][var9]);
               if (var5.isModified(5) && zka.a(var2[var10][var9], 8) > zka.a(var2[var8][var9], 4)) {
                  var6 = this.g(var1[var8][var9]);
                  var6.getBorders().getByBorderType(4).a(var5.getBorders().getByBorderType(8));
                  var6.b(4);
                  var1[var8][var9] = this.c.ac.a(var6);
               }
            }
         }
      }

      for(var8 = 0; var8 < var3; ++var8) {
         for(var9 = 1; var9 < var4; ++var9) {
            var5 = this.g(var1[var8][var9]);
            if (var5.isModified(2) && zka.a(var2[var8][var9], 1) > zka.a(var2[var8][var9 - 1], 2)) {
               var6 = this.g(var1[var8][var9 - 1]);
               var6.getBorders().getByBorderType(2).a(var5.getBorders().getByBorderType(1));
               var6.b(3);
               var1[var8][var9 - 1] = this.c.ac.a(var6);
            }

            var5 = this.g(var1[var8][var9 - 1]);
            if (var5.isModified(3) && zka.a(var2[var8][var9 - 1], 2) > zka.a(var2[var8][var9], 1)) {
               var6 = this.g(var1[var8][var9]);
               var6.getBorders().getByBorderType(1).a(var5.getBorders().getByBorderType(2));
               var6.b(2);
               var1[var8][var9] = this.c.ac.a(var6);
            }
         }
      }

   }

   private void b(int[][] var1, int[][] var2, int var3, int var4) {
      Style var5 = null;
      Style var6 = null;

      int var7;
      int var8;
      for(var7 = 1; var7 < var3; ++var7) {
         for(var8 = 0; var8 < var4; ++var8) {
            var5 = this.g(var1[var7][var8]);
            if (var5.isModified(4) && zka.a(var2[var7][var8], 4) > zka.a(var2[var7 - 1][var8], 8)) {
               var6 = this.g(var1[var7 - 1][var8]);
               var6.getBorders().getByBorderType(8).a(var5.getBorders().getByBorderType(4));
               var6.b(5);
               var1[var7 - 1][var8] = this.c.ac.a(var6);
            }

            var5 = this.g(var1[var7 - 1][var8]);
            if (var5.isModified(5) && zka.a(var2[var7 - 1][var8], 8) > zka.a(var2[var7][var8], 4)) {
               var6 = this.g(var1[var7][var8]);
               var6.getBorders().getByBorderType(4).a(var5.getBorders().getByBorderType(8));
               var6.b(4);
               var1[var7][var8] = this.c.ac.a(var6);
            }
         }
      }

      for(var7 = 0; var7 < var3; ++var7) {
         for(var8 = 1; var8 < var4; ++var8) {
            var5 = this.g(var1[var7][var8]);
            if (var5.isModified(2) && zka.a(var2[var7][var8], 1) > zka.a(var2[var7][var8 - 1], 2)) {
               var6 = this.g(var1[var7][var8 - 1]);
               var6.getBorders().getByBorderType(2).a(var5.getBorders().getByBorderType(1));
               var6.b(3);
               var1[var7][var8 - 1] = this.c.ac.a(var6);
            }

            var5 = this.g(var1[var7][var8 - 1]);
            if (var5.isModified(3) && zka.a(var2[var7][var8 - 1], 2) > zka.a(var2[var7][var8], 1)) {
               var6 = this.g(var1[var7][var8]);
               var6.getBorders().getByBorderType(1).a(var5.getBorders().getByBorderType(2));
               var6.b(2);
               var1[var7][var8] = this.c.ac.a(var6);
            }
         }
      }

   }

   private void a(Style var1, boolean var2) {
      int var3 = this.c.n - 1 - this.c.i;
      int var4 = this.c.o - this.c.k;

      for(int var5 = var4; var5 < this.i; ++var5) {
         String var6 = (String)this.p.get(var5 - var4);
         String var7 = "columnsubtotal";
         if (!var2) {
            var7 = "grandtotalcolumn";
         }

         if (var6 != null && var6.startsWith(var7)) {
            for(int var8 = 1; var8 <= var3; ++var8) {
               zda var9 = new zda();
               this.a(var9, var8, 1, var3);
               var9.c = true;
               var9.d = true;
               Style var10 = this.g(this.c.ad[var8][var5]);
               this.j[var8][var5] = zka.a(var10, var1, var9, a, this.j[var8][var5]);
               this.c.ad[var8][var5] = this.c.ac.a(var10);
            }
         }
      }

   }

   private void b(Style var1, boolean var2) {
      int var3 = this.c.o - 1 - this.c.k;
      int var4 = this.c.n - this.c.i;

      for(int var5 = var4; var5 < this.h; ++var5) {
         String var6 = (String)this.n.get(var5 - var4);
         String var7 = "rowsubtotal";
         if (!var2) {
            var7 = "grandtotalrow";
         }

         if (var6 != null && var6.startsWith(var7)) {
            for(int var8 = 0; var8 <= var3; ++var8) {
               zda var9 = new zda();
               this.b(var9, var8, 0, var3);
               var9.a = true;
               var9.b = true;
               Style var10 = this.g(this.c.ad[var5][var8]);
               this.j[var5][var8] = zka.a(var10, var1, var9, 19, this.j[var5][var8]);
               this.c.ad[var5][var8] = this.c.ac.a(var10);
            }
         }
      }

   }

   private void h(Style var1) {
      int var2 = this.c.o - 1 - this.c.k;
      int var3 = this.c.n - this.c.i;

      for(int var4 = var3; var4 < this.h; ++var4) {
         String var5 = (String)this.n.get(var4 - var3);
         if (var5 != null && var5.startsWith("blank")) {
            for(int var6 = 0; var6 <= var2; ++var6) {
               zda var7 = new zda();
               this.b(var7, var6, 0, var2);
               var7.a = true;
               var7.b = true;
               Style var8 = this.g(this.c.ad[var4][var6]);
               this.j[var4][var6] = zka.a(var8, var1, var7, 19, this.j[var4][var6]);
               this.c.ad[var4][var6] = this.c.ac.a(var8);
            }
         }
      }

   }

   private void i(Style var1) {
      if (this.v > 0) {
         int var2 = this.c.o - this.c.k;
         byte var3 = 0;

         for(int var4 = var2; var4 < this.i; ++var4) {
            zda var5 = new zda();
            this.b(var5, var4, var2, this.i - 1);
            var5.a = true;
            var5.b = true;
            Style var6 = this.g(this.c.ad[var3][var4]);
            this.j[var3][var4] = zka.a(var6, var1, var5, 22, this.j[var3][var4]);
            this.c.ad[var3][var4] = this.c.ac.a(var6);
         }
      }

   }

   private void j(Style var1) {
      if (this.v > 0) {
         int var2 = this.c.o - this.c.k;
         int var3 = this.c.n - 1 - this.c.i;

         for(int var4 = 0; var4 <= var3; ++var4) {
            for(int var5 = var2; var5 < this.i; ++var5) {
               zda var6 = new zda();
               this.b(var6, var5, var2, this.i - 1);
               var6.a = true;
               var6.b = true;
               Style var7 = this.g(this.c.ad[var4][var5]);
               this.j[var4][var5] = zka.a(var7, var1, var6, 22, this.j[var3][var5]);
               this.c.ad[var4][var5] = this.c.ac.a(var7);
            }
         }
      }

   }

   private void k(Style var1) {
      if (this.u > 0) {
         int var2 = this.c.o - 1 - this.c.k;
         int var3 = this.c.n - 1 - this.c.i;
         if (var3 < 0) {
            return;
         }

         for(int var4 = 0; var4 <= var3; ++var4) {
            for(int var5 = 0; var5 <= var2; ++var5) {
               zda var6 = new zda();
               this.b(var6, var5, 0, var2);
               var6.a = true;
               var6.b = true;
               Style var7 = this.g(this.c.ad[var4][var5]);
               this.j[var4][var5] = zka.a(var7, var1, var6, 22, this.j[var3][var5]);
               this.c.ad[var4][var5] = this.c.ac.a(var7);
            }
         }
      }

   }

   private void l(Style var1) {
      if (this.u > 1) {
         int var2 = this.c.n - this.c.i;
         int var3 = this.h - 1;
         if (this.c.getColumnGrand()) {
            if (this.q == 1) {
               if (this.u > 1) {
                  var3 -= this.w;
               }
            } else {
               --var3;
            }
         }

         for(int var4 = var2; var4 <= var3; ++var4) {
            String var5 = (String)this.n.get(var4 - var2);
            if (var5 != null && var5.startsWith("rowsubtitle")) {
               int[] var6 = this.a(com.aspose.cells.b.a.zv.d(var5.substring("rowsubtitle".length()), '+'));
               if (var6 != null && var6.length != 0 && var6[0] == 1) {
                  zda var7 = new zda();
                  var7.b = true;
                  var7.c = true;
                  var7.d = true;
                  var7.a = true;
                  byte var8 = 0;
                  int var9 = 0;
                  if (var6.length == 1 && !this.o.contains(var4 - var2)) {
                     var9 = this.c.o - 1 - this.c.k;
                  }

                  for(int var10 = var8; var10 <= var9; ++var10) {
                     Style var11 = this.g(this.c.ad[var4][var10]);
                     this.j[var4][var10] = zka.a(var11, var1, var7, a, this.j[var4][var10]);
                     this.c.ad[var4][var10] = this.c.ac.a(var11);
                  }
               }
            }
         }
      }

   }

   private void m(Style var1) {
      int var2 = this.c.o - this.c.k;
      int var3 = 0;
      if (this.v > 0) {
         var3 = this.v;
      }

      for(int var4 = var2; var4 < this.i; ++var4) {
         String var5 = (String)this.p.get(var4 - var2);
         if (var5 == null || !var5.startsWith("columnsubtotal") && !var5.startsWith("grandtotalcolumn")) {
            zda var6 = new zda();
            Style var7 = this.g(this.c.ad[var3][var4]);
            this.j[var3][var4] = zka.a(var7, var1, var6, 24, this.j[var3][var4]);
            this.c.ad[var3][var4] = this.c.ac.a(var7);
         }
      }

   }

   private void n(Style var1) {
      int var2;
      int var3;
      zda var4;
      Style var5;
      if (this.g) {
         for(var2 = 0; var2 < this.x; ++var2) {
            for(var3 = 0; var3 < 2; ++var3) {
               var4 = new zda();
               this.a(var4, var2, 0, this.x - 1);
               this.b(var4, var3, 0, 1);
               var5 = this.g(this.c.ae[var2][var3]);
               this.k[var2][var3] = zka.a(var5, var1, var4, 0, this.k[var2][var3]);
               this.c.ae[var2][var3] = this.c.ac.a(var5);
            }
         }
      }

      for(var2 = 0; var2 < this.h; ++var2) {
         for(var3 = 0; var3 < this.i; ++var3) {
            var4 = new zda();
            this.a(var4, var2, 0, this.h - 1);
            this.b(var4, var3, 0, this.i - 1);
            var5 = this.g(this.c.ad[var2][var3]);
            this.j[var2][var3] = zka.a(var5, var1, var4, 0, this.j[var2][var3]);
            this.c.ad[var2][var3] = this.c.ac.a(var5);
         }
      }

   }

   private void o(Style var1) {
      if (this.g) {
         for(int var2 = 0; var2 < this.x; ++var2) {
            zda var3 = new zda();
            var3.c = true;
            var3.d = true;
            this.a(var3, var2, 0, this.c.getPageFields().getCount() - 1);
            Style var4 = this.g(this.c.ae[var2][0]);
            this.k[var2][0] = zka.a(var4, var1, var3, 1, this.k[var2][0]);
            this.c.ae[var2][0] = this.c.ac.a(var4);
         }
      }

   }

   private void p(Style var1) {
      if (this.g) {
         for(int var2 = 0; var2 < this.x; ++var2) {
            zda var3 = new zda();
            var3.c = true;
            var3.d = true;
            this.a(var3, var2, 0, this.c.getPageFields().getCount() - 1);
            Style var4 = this.g(this.c.ae[var2][1]);
            this.k[var2][1] = zka.a(var4, var1, var3, 2, this.k[var2][1]);
            this.c.ae[var2][1] = this.c.ac.a(var4);
         }
      }

   }

   private void q(Style var1) {
      if (this.c.getShowPivotStyleRowHeader() && (this.u > 0 || this.v > 0)) {
         int var2 = this.c.o - 1 - this.c.k;

         for(int var3 = 0; var3 < this.h; ++var3) {
            for(int var4 = 0; var4 <= var2; ++var4) {
               zda var5 = new zda();
               this.a(var5, var3, 0, this.h - 1);
               this.b(var5, var4, 0, var2);
               Style var6 = this.g(this.c.ad[var3][var4]);
               this.j[var3][var4] = zka.a(var6, var1, var5, 8, this.j[var3][var4]);
               this.c.ad[var3][var4] = this.c.ac.a(var6);
            }
         }
      }

   }

   private void r(Style var1) {
      if (this.c.getShowPivotStyleColumnHeader()) {
         int var2 = this.c.n - 1 - this.c.i;

         for(int var3 = 0; var3 <= var2; ++var3) {
            for(int var4 = 0; var4 < this.i; ++var4) {
               zda var5 = new zda();
               this.a(var5, var3, 0, var2);
               this.b(var5, var4, 0, this.i - 1);
               Style var6 = this.g(this.c.ad[var3][var4]);
               this.j[var3][var4] = zka.a(var6, var1, var5, 9, this.j[var3][var4]);
               this.c.ad[var3][var4] = this.c.ac.a(var6);
            }
         }
      }

   }

   private void s(Style var1) {
      if (this.c.getShowPivotStyleRowHeader() && this.c.getShowPivotStyleColumnHeader() && this.v > 0) {
         int var2 = this.c.n - 2 - this.c.i;
         int var3 = this.c.o - 1 - this.c.k;

         for(int var4 = 0; var4 <= var2; ++var4) {
            for(int var5 = 0; var5 <= var3; ++var5) {
               zda var6 = new zda();
               this.a(var6, var4, 0, var2);
               this.b(var6, var5, 0, var3);
               Style var7 = this.g(this.c.ad[var4][var5]);
               this.j[var4][var5] = zka.a(var7, var1, var6, 11, this.j[var4][var5]);
               this.c.ad[var4][var5] = this.c.ac.a(var7);
            }
         }
      }

   }

   private void a(Style var1, Style var2, Style var3) {
      if (this.v > 1) {
         int var4 = this.c.o - this.c.k;

         for(int var5 = var4; var5 < this.i; ++var5) {
            String var6 = (String)this.p.get(var5 - var4);
            if (var6 != null && var6.startsWith("columnsubtotal")) {
               int var7 = com.aspose.cells.b.a.zo.a(var6.substring("columnsubtotal".length()));
               Object[] var8 = this.a(var7, new Style[]{var1, var2, var3});
               Style var9 = (Style)var8[0];
               int var10 = (Integer)var8[1];
               if (var9 != null) {
                  int var11 = var7;

                  for(int var12 = var7; var12 < this.h; ++var12) {
                     zda var13 = new zda();
                     this.a(var13, var12, var11, this.h - 1);
                     var13.c = true;
                     var13.d = true;
                     Style var14 = this.g(this.c.ad[var12][var5]);
                     this.j[var12][var5] = zka.a(var14, var9, var13, var10, this.j[var12][var5]);
                     this.c.ad[var12][var5] = this.c.ac.a(var14);
                  }
               }
            }
         }
      }

   }

   private Object[] a(int var1, Style[] var2) {
      Style var3 = null;
      byte var4 = 0;
      if (var1 == 1) {
         var3 = var2[0];
         var4 = 15;
      } else if (var1 == 2) {
         var3 = var2[1];
         var4 = 16;
      } else if (var1 == 3) {
         var3 = var2[2];
         var4 = 17;
      } else if (var1 > 0) {
         int var5 = var1 % 2;
         if (var5 == 0) {
            var3 = var2[1];
            var4 = 16;
         } else {
            var3 = var2[2];
            var4 = 17;
         }
      }

      return new Object[]{var3, Integer.valueOf(var4)};
   }

   private void t(Style var1) {
      if (this.u > 1) {
         int var2 = this.c.n - this.c.i;

         for(int var3 = var2; var3 < this.h; ++var3) {
            String var4 = (String)this.n.get(var3 - var2);
            if (var4 != null && "blank".equals(var4)) {
               byte var5 = 0;

               for(int var6 = var5; var6 < this.i; ++var6) {
                  zda var7 = new zda();
                  this.b(var7, var6, var5, this.i - 1);
                  var7.a = true;
                  var7.b = true;
                  Style var8 = this.g(this.c.ad[var3][var6]);
                  this.j[var3][var6] = zka.a(var8, var1, var7, 18, this.j[var3][var6]);
                  this.c.ad[var3][var6] = this.c.ac.a(var8);
               }
            }
         }
      }

   }

   private void b(Style var1, Style var2, Style var3) {
      if (this.u > 1) {
         int var4 = this.c.n - this.c.i;

         for(int var5 = var4; var5 < this.h; ++var5) {
            String var6 = (String)this.n.get(var5 - var4);
            if (var6 != null && var6.startsWith("rowsubtotal")) {
               int var7 = com.aspose.cells.b.a.zo.a(var6.substring("rowsubtotal".length()));
               Object[] var8 = this.b(var7, new Style[]{var1, var2, var3});
               Style var9 = (Style)var8[0];
               int var10 = (Integer)var8[1];
               if (var9 != null) {
                  int var11 = this.c(var7 - 1);

                  for(int var12 = var11; var12 < this.i; ++var12) {
                     zda var13 = new zda();
                     this.b(var13, var12, var11, this.i - 1);
                     var13.a = true;
                     var13.b = true;
                     Style var14 = this.g(this.c.ad[var5][var12]);
                     this.j[var5][var12] = zka.a(var14, var9, var13, var10, this.j[var5][var12]);
                     this.c.ad[var5][var12] = this.c.ac.a(var14);
                  }
               }
            }
         }
      }

   }

   private void c(Style var1, Style var2, Style var3) {
      if (this.u > 1) {
         int var4 = this.c.n - this.c.i;

         for(int var5 = var4; var5 < this.h; ++var5) {
            String var6 = (String)this.n.get(var5 - var4);
            if (var6 != null && var6.startsWith("rowsubtotal")) {
               int var7 = com.aspose.cells.b.a.zo.a(var6.substring("rowsubtotal".length()));
               Object[] var8 = this.b(var7, new Style[]{var1, var2, var3});
               Style var9 = (Style)var8[0];
               int var10 = (Integer)var8[1];
               if (var9 != null) {
                  int var11 = this.c(var7 - 1);
                  int var12 = this.c.o - 1 - this.c.k;

                  for(int var13 = var11; var13 <= var12; ++var13) {
                     zda var14 = new zda();
                     this.b(var14, var13, var11, var12);
                     var14.a = true;
                     var14.b = true;
                     Style var15 = this.g(this.c.ad[var5][var13]);
                     this.j[var5][var13] = zka.a(var15, var9, var14, var10, this.j[var5][var13]);
                     this.c.ad[var5][var13] = this.c.ac.a(var15);
                  }
               }
            }
         }
      }

   }

   private void a(Style var1, int var2, Style var3, int var4, Style var5, int var6) {
      if (this.u > 1) {
         int var7 = this.c.n - this.c.i;

         for(int var8 = var7; var8 < this.h; ++var8) {
            String var9 = (String)this.n.get(var8 - var7);
            if (var9 != null && var9.startsWith("rowsubtotal")) {
               int var10 = com.aspose.cells.b.a.zo.a(var9.substring("rowsubtotal".length()));
               Object[] var11 = this.a(var10, new Style[]{var1, var3, var5}, new int[]{var2, var4, var6});
               Style var12 = (Style)var11[0];
               int var13 = (Integer)var11[1];
               if (var12 != null) {
                  int var14 = this.c(var10 - 1);

                  for(int var15 = var14; var15 < this.i; ++var15) {
                     zda var16 = new zda();
                     this.b(var16, var15, var14, this.i - 1);
                     var16.a = true;
                     var16.b = true;
                     Style var17 = this.g(this.c.ad[var8][var15]);
                     this.j[var8][var15] = zka.a(var17, var12, var16, var13, this.j[var8][var15]);
                     this.c.ad[var8][var15] = this.c.ac.a(var17);
                  }
               }
            }
         }
      }

   }

   private Object[] a(int var1, Style[] var2, int[] var3) {
      Style var4 = null;
      int var5 = 0;
      if (var1 == 1) {
         var4 = var2[0];
         var5 = var3[0];
      } else if (var1 == 2) {
         var4 = var2[1];
         var5 = var3[1];
      } else if (var1 == 3) {
         var4 = var2[2];
         var5 = var3[2];
      } else if (var1 > 0) {
         int var6 = var1 % 2;
         if (var6 == 0) {
            var4 = var2[1];
            var5 = var3[1];
         } else {
            var4 = var2[2];
            var5 = var3[2];
         }
      }

      return new Object[]{var4, var5};
   }

   private Object[] b(int var1, Style[] var2) {
      Style var3 = null;
      byte var4 = 0;
      if (var1 == 1) {
         var3 = var2[0];
         var4 = 19;
      } else if (var1 == 2) {
         var3 = var2[1];
         var4 = 20;
      } else if (var1 == 3) {
         var3 = var2[2];
         var4 = 21;
      } else if (var1 > 0) {
         int var5 = var1 % 2;
         if (var5 == 0) {
            var3 = var2[1];
            var4 = 20;
         } else {
            var3 = var2[2];
            var4 = 21;
         }
      }

      return new Object[]{var3, Integer.valueOf(var4)};
   }

   private void d(Style var1, Style var2, Style var3) {
      if (this.c.getShowPivotStyleColumnHeader() && this.v > 0) {
         int var4 = this.c.o - this.c.k;
         Style var8 = null;

         int var6;
         int var7;
         int var9;
         int var13;
         for(var9 = var4; var9 < this.i; ++var9) {
            var7 = 0;
            String var10 = (String)this.p.get(var9 - var4);
            if (var10 != null && var10.startsWith("columnsubtotal")) {
               int var11 = com.aspose.cells.b.a.zo.a(var10.substring("columnsubtotal".length()));
               Object[] var12 = this.c(var11, new Style[]{var1, var2, var3});
               if (var12 != null) {
                  var8 = (Style)var12[0];
                  var7 = (Integer)var12[1];
               }

               if (var8 != null) {
                  int var5 = var11;
                  var6 = this.c.n - 1 - this.c.i;

                  for(var13 = var11; var13 <= var6; ++var13) {
                     zda var14 = new zda();
                     this.a(var14, var13, var5, var6);
                     var14.c = true;
                     var14.d = true;
                     Style var15 = this.g(this.c.ad[var13][var9]);
                     this.j[var13][var9] = zka.a(var15, var8, var14, var7, this.j[var13][var9]);
                     this.c.ad[var13][var9] = this.c.ac.a(var15);
                  }
               }
            }
         }

         byte var20 = 1;
         var6 = this.c.n - 1 - this.c.i;
         var8 = null;
         var7 = 0;
         var9 = this.i - 1;
         if (this.c.getRowGrand()) {
            if (this.q == 2) {
               if (this.v > 1) {
                  var9 -= this.w;
               }
            } else {
               --var9;
            }
         }

         for(int var21 = var20; var21 <= var6; ++var21) {
            Object[] var22 = this.c(var21, new Style[]{var1, var2, var3});
            if (var22 != null) {
               var8 = (Style)var22[0];
               var7 = (Integer)var22[1];
            }

            if (var8 != null) {
               int var23 = -1;
               var13 = var4;
               int var24 = var9;
               boolean var25 = false;

               for(int var16 = var4; var16 <= var9; ++var16) {
                  if (var25) {
                     var25 = false;
                  } else {
                     if (var23 != -1) {
                        var13 = var23;
                        var24 = var9;
                        var23 = -1;
                     }

                     String var17 = (String)this.p.get(var16 - var4);
                     int var18;
                     if (var17 != null && var17.startsWith("columnsubtotal")) {
                        var18 = com.aspose.cells.b.a.zo.a(var17.substring("columnsubtotal".length()));
                        if (var18 <= var21) {
                           var23 = var16 + 1;
                           continue;
                        }
                     }

                     if (var16 < var9) {
                        var17 = (String)this.p.get(var16 + 1 - var4);
                        if (var17 != null && var17.startsWith("columnsubtotal")) {
                           var18 = com.aspose.cells.b.a.zo.a(var17.substring("columnsubtotal".length()));
                           if (var18 <= var21) {
                              var25 = true;
                              var23 = var16 + 2;
                              var24 = var16;
                           }
                        }
                     }

                     zda var26 = new zda();
                     this.b(var26, var16, var13, var24);
                     var26.a = true;
                     var26.b = true;
                     Style var19 = this.g(this.c.ad[var21][var16]);
                     this.j[var21][var16] = zka.a(var19, var8, var26, var7, this.j[var21][var16]);
                     this.c.ad[var21][var16] = this.c.ac.a(var19);
                  }
               }
            }
         }
      }

   }

   private Object[] c(int var1, Style[] var2) {
      Style var3 = null;
      byte var4 = 0;
      if (var1 == 1) {
         var3 = var2[0];
         var4 = 22;
      } else if (var1 == 2) {
         var3 = var2[1];
         var4 = 23;
      } else if (var1 == 3) {
         var3 = var2[2];
         var4 = 24;
      } else if (var1 > 0) {
         int var5 = var1 % 2;
         if (var5 == 0) {
            var3 = var2[1];
            var4 = 23;
         } else {
            var3 = var2[2];
            var4 = 24;
         }
      }

      return new Object[]{var3, Integer.valueOf(var4)};
   }

   private void e(Style var1, Style var2, Style var3) {
      if (this.c.getShowPivotStyleRowHeader() && this.u > 1) {
         int var4 = this.c.n - this.c.i;
         int var5 = this.h - 1;
         if (this.c.getColumnGrand()) {
            if (this.q == 1) {
               if (this.u > 1) {
                  var5 -= this.w;
               }
            } else {
               --var5;
            }
         }

         int var6 = 0;
         int var7 = var4;

         int var8;
         int var11;
         int var16;
         int var17;
         zda var31;
         Style var32;
         for(var8 = 0; var8 < this.u - 1; ++var8) {
            PivotField var9 = this.c.getRowFields().get(var8);
            if (var9.getShowInOutlineForm()) {
               ++var7;
               if (!var9.getShowCompact()) {
                  ++var6;
               }
            } else {
               Style var10 = null;
               var11 = 0;
               Object[] var12 = this.d(var8, new Style[]{var1, var2, var3});
               if (var12 != null) {
                  var10 = (Style)var12[0];
                  var11 = (Integer)var12[1];
               }

               if (var10 != null) {
                  int var13 = -1;
                  boolean var14 = false;
                  int var15 = var7;
                  var16 = var5;

                  for(var17 = var7; var17 <= var5; ++var17) {
                     if (var14) {
                        var14 = false;
                     } else {
                        if (var13 != -1) {
                           var15 = var13;
                           var16 = var5;
                           var13 = -1;
                        }

                        String var18 = (String)this.n.get(var17 - var4);
                        int var19;
                        if (var18 != null) {
                           if (var18.startsWith("rowsubtotal")) {
                              var19 = com.aspose.cells.b.a.zo.a(var18.substring("rowsubtotal".length()));
                              if (var19 <= var8 + 1) {
                                 var13 = var17 + 1;
                                 continue;
                              }
                           } else if (var18.startsWith("blank")) {
                              var13 = var17 + 1;
                              continue;
                           }
                        }

                        if (var17 < var5) {
                           var18 = (String)this.n.get(var17 + 1 - var4);
                           if (var18 != null) {
                              if (var18.startsWith("rowsubtotal")) {
                                 var19 = com.aspose.cells.b.a.zo.a(var18.substring("rowsubtotal".length()));
                                 if (var19 <= var8 + 1) {
                                    var14 = true;
                                    var13 = var17 + 2;
                                    var16 = var17;
                                 }
                              } else if (var18.startsWith("blank")) {
                                 var14 = true;
                                 var13 = var17 + 2;
                                 var16 = var17;
                              } else if (var18.startsWith("rowsubtitle")) {
                                 int[] var30 = this.a(com.aspose.cells.b.a.zv.d(var18.substring("rowsubtitle".length()), '+'));
                                 if (var30 != null) {
                                    for(int var20 = 0; var20 < var30.length; ++var20) {
                                       if (var30[var20] <= var8 + 1) {
                                          var13 = var17 + 1;
                                          var16 = var17;
                                          break;
                                       }
                                    }
                                 }
                              }
                           }
                        }

                        var31 = new zda();
                        this.a(var31, var17, var15, var16);
                        var31.c = true;
                        var31.d = true;
                        var32 = this.g(this.c.ad[var17][var6]);
                        this.j[var17][var6] = zka.a(var32, var10, var31, var11, this.j[var17][var6]);
                        this.c.ad[var17][var6] = this.c.ac.a(var32);
                     }
                  }

                  ++var6;
               }
            }
         }

         for(var8 = var4; var8 <= var5; ++var8) {
            String var21 = (String)this.n.get(var8 - var4);
            if (var21 != null && var21.startsWith("rowsubtitle")) {
               int[] var22 = this.a(com.aspose.cells.b.a.zv.d(var21.substring("rowsubtitle".length()), '+'));
               if (var22 != null && (var22.length != 1 || var22[var22.length - 1] != this.u)) {
                  for(var11 = 0; var11 < var22.length; ++var11) {
                     PivotField var23 = this.c.getRowFields().get(var22[var11] - 1);
                     if (var23.getShowInOutlineForm()) {
                        Style var24 = null;
                        int var25 = 0;
                        Object[] var26 = this.d(var22[var11] - 1, new Style[]{var1, var2, var3});
                        if (var26 != null) {
                           var24 = (Style)var26[0];
                           var25 = (Integer)var26[1];
                        }

                        if (var24 != null) {
                           var16 = this.c(var22[var11] - 1);
                           if (var11 != var22.length - 1) {
                              zda var27 = new zda();
                              var27.a = true;
                              var27.b = true;
                              var27.c = true;
                              var27.d = true;
                              Style var29 = this.g(this.c.ad[var8][var16]);
                              this.j[var8][var16] = zka.a(var29, var24, var27, var25, this.j[var8][var16]);
                              this.c.ad[var8][var16] = this.c.ac.a(var29);
                           } else if (var22[var11] != this.u) {
                              var17 = this.i - 1;
                              if (this.b(var22[var11] - 1)) {
                                 var17 = this.c.o - 1 - this.c.k;
                              }

                              for(int var28 = var16; var28 <= var17; ++var28) {
                                 var31 = new zda();
                                 this.b(var31, var28, var16, var17);
                                 var31.a = true;
                                 var31.b = true;
                                 var32 = this.g(this.c.ad[var8][var28]);
                                 this.j[var8][var28] = zka.a(var32, var24, var31, var25, this.j[var8][var28]);
                                 this.c.ad[var8][var28] = this.c.ac.a(var32);
                              }
                           }
                        }
                     }
                  }
               }
            }
         }
      }

   }

   private void u(Style var1) {
      if (this.u > 1) {
         int var2 = this.c.o - 1 - this.c.k;
         int var3 = this.i - 1;
         int var4 = this.c.n - this.c.i;
         boolean var5 = false;
         int var6 = this.u - 2;

         for(int var7 = var4; var7 < this.h; ++var7) {
            var5 = false;
            String var8 = (String)this.n.get(var7 - var4);
            if (var8 == null || !var8.startsWith("rowsubtotal") && !var8.startsWith("blank")) {
               int var10;
               if (var7 < this.h - 1) {
                  var8 = (String)this.n.get(var7 + 1 - var4);
                  if (var8 != null) {
                     if (var8.startsWith("rowsubtotal")) {
                        var5 = true;
                     } else if (var8.startsWith("blank")) {
                        var5 = true;
                     } else if (var8.startsWith("rowsubtitle")) {
                        int[] var9 = this.a(com.aspose.cells.b.a.zv.d(var8.substring("rowsubtitle".length()), '+'));
                        if (var9 != null) {
                           for(var10 = 0; var10 < var9.length; ++var10) {
                              if (var9[var10] <= var6 + 1) {
                                 var5 = true;
                                 break;
                              }
                           }
                        }
                     }
                  }
               }

               if (var5) {
                  zda var12 = new zda();
                  var12.b = true;

                  for(var10 = var2; var10 <= var3; ++var10) {
                     Style var11 = this.g(this.c.ad[var7][var10]);
                     this.j[var7][var10] = zka.a(var11, var1, var12, a, this.j[var7][var10]);
                     this.c.ad[var7][var10] = this.c.ac.a(var11);
                  }
               }
            }
         }
      }

   }

   private void F() {
      int var1 = this.c.n - this.c.i;
      int var2 = this.h - 1;
      Style var3 = null;
      boolean var4 = false;
      boolean var5 = false;
      boolean var6 = this.a(this.c.getRowFields());

      for(int var7 = var1; var7 <= var2; ++var7) {
         String var8 = (String)this.n.get(var7 - var1);
         if (var8 != null) {
            int var13;
            int var15;
            if (!var8.startsWith("rowsubtitle")) {
               if (var8.startsWith("rowsubtotal")) {
                  int var17 = com.aspose.cells.b.a.zo.a(var8.substring("rowsubtotal".length()));
                  var13 = this.c(var17 - 1);
                  var15 = this.d(var17 - 1);
                  if (!var6 || var15 != 0) {
                     var3 = zava.a(this.y, var15);
                     zda var19 = new zda();
                     Style var20 = this.g(this.c.ad[var7][var13]);
                     this.j[var7][var13] = zka.a(var20, var3, var19, 25, this.j[var7][var13]);
                     this.c.ad[var7][var13] = this.c.ac.a(var20);
                  }
               } else if ("grandtotalrow".equals(var8)) {
                  byte var14 = 0;
                  if (!var6) {
                     var3 = zava.a(this.y, 0);
                     zda var16 = new zda();
                     Style var18 = this.g(this.c.ad[var7][var14]);
                     this.j[var7][var14] = zka.a(var18, var3, var16, 29, this.j[var7][var14]);
                     this.c.ad[var7][var14] = this.c.ac.a(var18);
                  }
               }
            } else {
               int[] var9 = this.a(com.aspose.cells.b.a.zv.d(var8.substring("rowsubtitle".length()), '+'));

               for(int var10 = 0; var10 < var9.length; ++var10) {
                  var13 = this.c(var9[var10] - 1);
                  var15 = this.d(var9[var10] - 1);
                  if (!var6 || var15 != 0) {
                     var3 = zava.a(this.y, var15);
                     zda var11 = new zda();
                     Style var12 = this.g(this.c.ad[var7][var13]);
                     this.j[var7][var13] = zka.a(var12, var3, var11, 25, this.j[var7][var13]);
                     this.c.ad[var7][var13] = this.c.ac.a(var12);
                  }
               }
            }
         }
      }

   }

   private void a(Style var1, Style var2, Style var3, Style var4, Style var5, Style var6, Style var7, Style var8, Style var9, Style var10, Style var11) {
      if (this.c.getShowPivotStyleRowHeader() && this.u > 1) {
         int var12 = this.c.n - this.c.i;
         int var13 = this.h - 1;
         if (this.c.getColumnGrand()) {
            if (this.q == 1) {
               if (this.u > 1) {
                  var13 -= this.w;
               }
            } else {
               --var13;
            }
         }

         int var14 = 0;
         int var15 = var12;

         int var16;
         int var19;
         int var23;
         int var25;
         int var27;
         Style var28;
         zda var43;
         for(var16 = 0; var16 < this.u - 1; ++var16) {
            PivotField var17 = this.c.getRowFields().get(var16);
            if (var17.getShowInOutlineForm()) {
               ++var15;
               if (!var17.getShowCompact()) {
                  ++var14;
               }
            } else {
               Style var18 = null;
               var19 = 0;
               Object[] var20 = this.d(var16, new Style[]{var1, var4, var7});
               if (var20 != null) {
                  var18 = (Style)var20[0];
                  var19 = (Integer)var20[1];
               }

               if (var18 != null) {
                  int var21 = -1;
                  boolean var22 = false;
                  var23 = var15;
                  int var24 = var13;

                  for(var25 = var15; var25 <= var13; ++var25) {
                     if (var22) {
                        var22 = false;
                     } else {
                        if (var21 != -1) {
                           var23 = var21;
                           var24 = var13;
                           var21 = -1;
                        }

                        String var26 = (String)this.n.get(var25 - var12);
                        if (var26 != null) {
                           if (var26.startsWith("rowsubtotal")) {
                              var27 = com.aspose.cells.b.a.zo.a(var26.substring("rowsubtotal".length()));
                              if (var27 <= var16 + 1) {
                                 var21 = var25 + 1;
                                 continue;
                              }
                           } else if (var26.startsWith("blank")) {
                              var21 = var25 + 1;
                              continue;
                           }
                        }

                        if (var25 < var13) {
                           var26 = (String)this.n.get(var25 + 1 - var12);
                           if (var26 != null) {
                              if (var26.startsWith("rowsubtotal")) {
                                 var27 = com.aspose.cells.b.a.zo.a(var26.substring("rowsubtotal".length()));
                                 if (var27 <= var16 + 1) {
                                    var22 = true;
                                    var21 = var25 + 2;
                                    var24 = var25;
                                 }
                              } else if (var26.startsWith("blank")) {
                                 var22 = true;
                                 var21 = var25 + 2;
                                 var24 = var25;
                              }
                           }
                        }

                        var43 = new zda();
                        this.a(var43, var25, var23, var24);
                        var43.c = true;
                        var43.d = true;
                        var28 = this.g(this.c.ad[var25][var14]);
                        this.j[var25][var14] = zka.a(var28, var18, var43, var19, this.j[var25][var14]);
                        this.c.ad[var25][var14] = this.c.ac.a(var28);
                     }
                  }

                  ++var14;
               }
            }
         }

         for(var16 = var12; var16 <= var13; ++var16) {
            String var33 = (String)this.n.get(var16 - var12);
            if (var33 != null && var33.startsWith("rowsubtitle")) {
               int[] var34 = this.a(com.aspose.cells.b.a.zv.d(var33.substring("rowsubtitle".length()), '+'));

               for(var19 = 0; var19 < var34.length; ++var19) {
                  int var35 = this.c(var34[var19] - 1);
                  Style var38;
                  if (var34[var19] == this.u) {
                     zda var37;
                     if (var10 != null) {
                        var37 = new zda();
                        var37.a = true;
                        var37.b = true;
                        var37.c = true;
                        var37.d = true;
                        var38 = this.g(this.c.ad[var16][var35]);
                        this.j[var16][var35] = zka.a(var38, var10, var37, 27, this.j[var16][var35]);
                        this.c.ad[var16][var35] = this.c.ac.a(var38);
                     }

                     if (var11 != null) {
                        var37 = new zda();
                        var37.a = true;
                        var37.b = true;
                        var37.c = true;
                        var37.d = true;
                        var38 = this.g(this.c.ad[var16][this.i - 1]);
                        this.j[var16][this.i - 1] = zka.a(var38, var11, var37, 27, this.j[var16][this.i - 1]);
                        this.c.ad[var16][this.i - 1] = this.c.ac.a(var38);
                     }
                  } else {
                     PivotField var36 = this.c.getRowFields().get(var34[var19] - 1);
                     if (var36.getShowInOutlineForm()) {
                        var38 = null;
                        var23 = 0;
                        Object[] var39;
                        zda var41;
                        Style var42;
                        if (var19 != var34.length - 1) {
                           var39 = this.d(var34[var19] - 1, new Style[]{var1, var4, var7});
                           if (var39 != null) {
                              var38 = (Style)var39[0];
                              var23 = (Integer)var39[1];
                           }

                           if (var38 != null) {
                              var41 = new zda();
                              var41.a = true;
                              var41.b = true;
                              var41.c = true;
                              var41.d = true;
                              var42 = this.g(this.c.ad[var16][var35]);
                              this.j[var16][var35] = zka.a(var42, var38, var41, var23, this.j[var16][var35]);
                              this.c.ad[var16][var35] = this.c.ac.a(var42);
                           }

                           var38 = null;
                        } else {
                           var39 = this.d(var34[var19] - 1, new Style[]{var2, var5, var8});
                           if (var39 != null) {
                              var38 = (Style)var39[0];
                              var23 = (Integer)var39[1];
                           }

                           if (var38 != null) {
                              var25 = this.i - 1;
                              if (this.b(var34[var19] - 1)) {
                                 var25 = this.c.o - 1 - this.c.k;
                              }

                              for(int var40 = var35; var40 <= var25; ++var40) {
                                 var43 = new zda();
                                 this.b(var43, var40, var35, var25);
                                 var43.a = true;
                                 var43.b = true;
                                 var28 = this.g(this.c.ad[var16][var40]);
                                 this.j[var16][var40] = zka.a(var28, var38, var43, var23, this.j[var16][var40]);
                                 this.c.ad[var16][var40] = this.c.ac.a(var28);
                              }

                              var38 = null;
                           }

                           var39 = this.d(var34[var19] - 1, new Style[]{var1, var4, var7});
                           if (var39 != null) {
                              var38 = (Style)var39[0];
                              var23 = (Integer)var39[1];
                           }

                           if (var38 != null) {
                              var41 = new zda();
                              var41.a = true;
                              var41.b = true;
                              var41.c = true;
                              var41.d = true;
                              var42 = this.g(this.c.ad[var16][var35]);
                              this.j[var16][var35] = zka.a(var42, var38, var41, var23, this.j[var16][var35]);
                              this.c.ad[var16][var35] = this.c.ac.a(var42);
                              if (!this.c.af && this.c.e.a() == 6 && var16 + 1 - var12 < this.n.size() && ((String)this.n.get(var16 + 1 - var12)).indexOf("rowsubtitle") == -1) {
                                 var27 = 0;

                                 for(int var44 = var35 + 1; var44 < this.i; ++var44) {
                                    if (var27 == 0) {
                                       Style var29 = this.g(this.c.ad[var16][var44]);
                                       int var30 = var29.getHorizontalAlignment();
                                       int var31 = var29.getVerticalAlignment();
                                       Style var32 = this.c.ac.a(this.c.ad[var16][var35]);
                                       var29.copy(var32);
                                       var29.setHorizontalAlignment(var30);
                                       var29.setVerticalAlignment(var31);
                                       var27 = this.c.ac.a(var29);
                                    }

                                    this.c.ad[var16][var44] = var27;
                                 }
                              }
                           }

                           var38 = null;
                           var39 = this.d(var34[var19] - 1, new Style[]{var3, var6, var9});
                           if (var39 != null) {
                              var38 = (Style)var39[0];
                              var23 = (Integer)var39[1];
                           }

                           if (var38 != null) {
                              var41 = new zda();
                              var41.a = true;
                              var41.b = true;
                              var41.c = true;
                              var41.d = true;
                              var42 = this.g(this.c.ad[var16][this.i - 1]);
                              this.j[var16][this.i - 1] = zka.a(var42, var38, var41, var23, this.j[var16][this.i - 1]);
                              this.c.ad[var16][this.i - 1] = this.c.ac.a(var42);
                              var38 = null;
                              if (!this.c.af && this.c.e.a() == 7) {
                                 for(var27 = this.c.o - var35; var27 < this.i - 1; ++var27) {
                                    this.c.ad[var16][var27] = this.c.ad[var16][this.i - 1];
                                 }
                              }
                           }
                        }
                     }
                  }
               }
            }
         }
      }

   }

   private void v(Style var1) {
      if (this.c.getRowGrand()) {
         if (this.v == 1 && this.c.getColumnFields().get(0).i()) {
            return;
         }

         byte var2 = 1;
         if (this.v == 0) {
            var2 = 0;
         }

         int var3 = this.h - 1;
         int var4 = this.i - 1;
         int var5 = var4;
         if (this.q == 2 && this.v > 1) {
            var5 = var4 - this.w + 1;
         }

         for(int var6 = var2; var6 <= var3; ++var6) {
            for(int var7 = var5; var7 <= var4; ++var7) {
               zda var8 = new zda();
               this.a(var8, var6, var2, var3);
               this.b(var8, var7, var5, var4);
               Style var9 = this.g(this.c.ad[var6][var7]);
               this.j[var6][var7] = zka.a(var9, var1, var8, 28, this.j[var6][var7]);
               this.c.ad[var6][var7] = this.c.ac.a(var9);
            }
         }
      }

   }

   private void w(Style var1) {
      if (this.c.getRowGrand()) {
         if (this.v == 1 && this.c.getColumnFields().get(0).i()) {
            return;
         }

         byte var2 = 1;
         if (this.v == 0) {
            var2 = 0;
         }

         int var3 = this.i - 1;
         int var4 = var3;
         if (this.q == 2 && this.v > 1) {
            var4 = var3 - this.w + 1;
         }

         for(int var5 = var4; var5 <= var3; ++var5) {
            zda var6 = new zda();
            this.b(var6, var5, var4, var3);
            var6.a = true;
            var6.b = true;
            Style var7 = this.g(this.c.ad[var2][var5]);
            this.j[var2][var5] = zka.a(var7, var1, var6, 28, this.j[var2][var5]);
            this.c.ad[var2][var5] = this.c.ac.a(var7);
         }
      }

   }

   private void x(Style var1) {
      if (this.c.getColumnGrand()) {
         if (this.u == 1 && this.c.getRowFields().get(0).i()) {
            return;
         }

         if (this.u == 0 && this.w > 1) {
            return;
         }

         int var2 = this.h - 1;
         int var3 = var2;
         if (this.q == 1 && this.v > 1) {
            var3 = var2 - this.w + 1;
         }

         for(int var4 = var3; var4 <= var2; ++var4) {
            zda var5 = new zda();
            this.a(var5, var4, var3, var2);
            var5.c = true;
            var5.d = true;
            Style var6 = this.g(this.c.ad[var4][0]);
            this.j[var4][0] = zka.a(var6, var1, var5, 29, this.j[var4][0]);
            this.c.ad[var4][0] = this.c.ac.a(var6);
         }
      }

   }

   private void y(Style var1) {
      if (this.c.getColumnGrand()) {
         if (this.u == 1 && this.c.getRowFields().get(0).i()) {
            return;
         }

         if (this.u == 0 && this.w > 1) {
            return;
         }

         byte var2 = 0;
         int var3 = this.i - 1;
         int var4 = this.h - 1;
         int var5 = var4;
         if (this.q == 1 && this.v > 1) {
            var5 = var4 - this.w + 1;
         }

         for(int var6 = var2; var6 <= var3; ++var6) {
            for(int var7 = var5; var7 <= var4; ++var7) {
               zda var8 = new zda();
               this.b(var8, var6, var2, var3);
               this.a(var8, var7, var5, var4);
               Style var9 = this.g(this.c.ad[var7][var6]);
               this.j[var7][var6] = zka.a(var9, var1, var8, 29, this.j[var7][var6]);
               this.c.ad[var7][var6] = this.c.ac.a(var9);
            }
         }
      }

   }

   private boolean b(int var1) {
      for(int var2 = var1; var2 < this.u - 1; ++var2) {
         PivotField var3 = this.c.getRowFields().get(var2);
         if (var3.getShowInOutlineForm()) {
            return false;
         }
      }

      return true;
   }

   private int c(int var1) {
      int var2 = 0;
      if (var1 >= this.u) {
         var1 = this.u - 1;
      }

      for(int var3 = 0; var3 < var1; ++var3) {
         PivotField var4 = this.c.getRowFields().get(var3);
         if ((!var4.getShowInOutlineForm() || !var4.getShowCompact() || var4.i()) && (!var4.i() || !this.c.x || !this.c.v)) {
            ++var2;
         }
      }

      return var2;
   }

   private int d(int var1) {
      int var2 = 0;
      if (var1 >= this.u) {
         var1 = this.u - 1;
      }

      for(int var3 = var1 - 1; var3 >= 0; --var3) {
         PivotField var4 = this.c.getRowFields().get(var3);
         if (!var4.i() && var4.getShowInOutlineForm() && var4.getShowCompact() || var4.i() && this.c.x && this.c.v) {
            ++var2;
         }
      }

      return var2;
   }

   private Object[] d(int var1, Style[] var2) {
      Style var3 = null;
      boolean var4 = false;
      byte var6;
      if (var1 == 0) {
         var3 = var2[0];
         var6 = 25;
      } else if (var1 == 1) {
         var3 = var2[1];
         var6 = 26;
      } else if (var1 == 2) {
         var3 = var2[2];
         var6 = 27;
      } else {
         int var5 = var1 % 2;
         if (var5 == 1) {
            var3 = var2[1];
            var6 = 26;
         } else {
            var3 = var2[2];
            var6 = 27;
         }
      }

      return new Object[]{var3, Integer.valueOf(var6)};
   }

   private int[] a(String[] var1) {
      if (var1 != null && var1.length != 0) {
         int[] var2 = new int[var1.length];

         for(int var3 = 0; var3 < var1.length; ++var3) {
            var2[var3] = com.aspose.cells.b.a.zo.a(var1[var3]);
         }

         return var2;
      } else {
         return null;
      }
   }

   private void a(zda var1, int var2, int var3, int var4) {
      var1.a = false;
      var1.b = false;
      var1.e = false;
      var1.f = false;
      if (var2 == var3) {
         var1.a = true;
         if (var2 == var4) {
            var1.b = true;
         } else {
            var1.f = true;
         }
      } else if (var2 == var4) {
         var1.b = true;
         if (var2 == var3) {
            var1.a = true;
         } else {
            var1.e = true;
         }
      } else {
         var1.f = true;
         var1.e = true;
      }

   }

   private void b(zda var1, int var2, int var3, int var4) {
      var1.c = false;
      var1.d = false;
      var1.g = false;
      var1.h = false;
      if (var2 == var3) {
         var1.c = true;
         if (var2 == var4) {
            var1.d = true;
         } else {
            var1.h = true;
         }
      } else if (var2 == var4) {
         var1.d = true;
         if (var2 == var3) {
            var1.c = true;
         } else {
            var1.g = true;
         }
      } else {
         var1.g = true;
         var1.h = true;
      }

   }

   void a(Style var1) {
      zbqy var2 = new zbqy(this.c.ag);
      this.c.ag.a(var2);
      var2.b = this.c.a.b.c().getDxfs().a(var1);
      zbro var3 = new zbro();
      var2.c = var3;
      var3.a(false);
      var3.b(false);
      var3.b((byte)3);
      this.a(var2);
   }

   void a(int var1, int var2, Style var3) {
      boolean var4 = false;
      boolean var5 = false;
      if (var1 >= this.c.i && var1 <= this.c.j && var2 >= this.c.k && var2 <= this.c.l) {
         var4 = true;
      }

      int var6;
      int var7;
      if (this.x > 0) {
         var6 = this.c.i - this.x - 1;
         var7 = this.c.i - 2;
         int var8 = this.c.k;
         int var9 = this.c.k + 1;
         if (var1 >= var6 && var1 <= var7 && var2 >= var8 && var2 <= var9) {
            var5 = true;
            var4 = true;
         }
      }

      if (var4) {
         if (this.s == null || this.t == null) {
            this.z.f = this.z.a(-1);
            this.z.f();
            this.z.g();
            this.z.d();
            this.z.e();
            this.a();
         }

         zbqy var16;
         zbro var17;
         if (var5) {
            if (var2 == this.c.k) {
               var16 = new zbqy(this.c.ag);
               this.c.ag.a(var16);
               var16.b = this.c.a.b.c().getDxfs().a(var3);
               var17 = new zbro();
               var16.c = var17;
               var17.a = (byte)(var1 - (this.c.i - 1 - this.x));
               var17.a((byte)4);
               var17.a(false);
               var17.b(true);
               var17.b = (byte)this.c.getPageFields().get(var17.a & 255).getBaseIndex();
               var17.b((byte)5);
               this.a(var16);
            } else {
               var16 = new zbqy(this.c.ag);
               this.c.ag.a(var16);
               var16.b = this.c.a.b.c().getDxfs().a(var3);
               var17 = new zbro();
               var16.c = var17;
               var17.a(false);
               var17.b(true);
               zbqw var18 = new zbqw();
               com.aspose.cells.b.a.a.ze.a(var17.e, (Object)var18);
               var18.a((int)1);
               var18.b(this.c.getPageFields().get(var1 - (this.c.i - 1 - this.x)).getBaseIndex());
               this.a(var16);
            }
         } else {
            zbrd var10;
            int var11;
            int var13;
            zbqy var19;
            zbqy var20;
            zbro var21;
            zbro var22;
            int var25;
            zbqw var28;
            if (this.v > 0) {
               var6 = this.c.n - 2;
               if (this.u == 0) {
                  var6 = this.c.n - 1;
               }

               if (var1 >= this.c.i && var1 <= var6 && var2 >= this.c.k && var2 <= this.c.o - 1) {
                  var20 = new zbqy(this.c.ag);
                  this.c.ag.a(var20);
                  var20.b = this.c.a.b.c().getDxfs().a(var3);
                  var21 = new zbro();
                  var20.c = var21;
                  var21.a(false);
                  var21.b(true);
                  var21.b((byte)4);
                  var21.h(true);
                  var21.f = var21.g = (byte)(var1 - this.c.i);
                  var21.h = var21.i = (byte)(var2 - this.c.k);
                  this.a(var20);
                  return;
               }

               if (var1 == this.c.i && var2 >= this.c.o && var2 <= this.c.o + this.v - 1) {
                  var20 = new zbqy(this.c.ag);
                  this.c.ag.a(var20);
                  var20.b = this.c.a.b.c().getDxfs().a(var3);
                  var21 = new zbro();
                  var20.c = var21;
                  var21.a(false);
                  var21.b(true);
                  var21.b((byte)5);
                  var21.a = (byte)(var2 - this.c.o);
                  var21.a((byte)2);
                  var21.b = (byte)this.c.getColumnFields().get(var21.a & 255).getBaseIndex();
                  this.a(var20);
                  return;
               }

               if (var1 == this.c.i && var2 >= this.c.o + this.v && var2 <= this.c.l) {
                  var20 = new zbqy(this.c.ag);
                  this.c.ag.a(var20);
                  var20.b = this.c.a.b.c().getDxfs().a(var3);
                  var21 = new zbro();
                  var20.c = var21;
                  var21.a(false);
                  var21.b(true);
                  var21.b((byte)6);
                  var21.h(true);
                  var21.f = var21.g = 0;
                  var21.h = var21.i = (byte)(var2 - this.c.o - this.v);
                  this.a(var20);
                  return;
               }

               if (var1 > this.c.i && var1 < this.c.n && var2 >= this.c.o) {
                  var7 = var2 - this.c.o;
                  if (var7 < this.t.size()) {
                     var19 = new zbqy(this.c.ag);
                     this.c.ag.a(var19);
                     var19.b = this.c.a.b.c().getDxfs().a(var3);
                     var22 = new zbro();
                     var19.c = var22;
                     var22.a(false);
                     var22.b(true);
                     var22.e(false);
                     var10 = (zbrd)this.t.get(var7);
                     if (var10.c == 13) {
                        var22.d(true);
                        var22.h(true);
                        var22.h = var22.i = -1;
                        var22.f = var22.g = (byte)(var1 - this.c.i - 1 - var10.b);
                        this.a(var19);
                        return;
                     }

                     if (var1 - this.c.i - 1 >= var10.b) {
                        boolean var27 = false;
                        var25 = Math.min(var1 - this.c.i - 1, var10.e - 1);

                        for(var13 = 0; var13 <= var25; ++var13) {
                           var28 = new zbqw();
                           com.aspose.cells.b.a.a.ze.a(var22.e, (Object)var28);
                           var28.b(this.c.getColumnFields().get(var13).getBaseIndex());
                           var28.b((byte)var13);
                           var28.a((byte)2);
                           var28.a(true);
                           if (var13 == var10.e - 1) {
                              if (var10.c != 0 && var10.c != 14 && var10.c != 13) {
                                 var27 = true;
                                 var28.a(this.f(var10.c));
                              } else {
                                 var28.a((int)1);
                              }
                           } else {
                              var28.a((int)1);
                           }

                           com.aspose.cells.b.a.a.ze.a(var28.c, (Object)var10.f[var13]);
                        }

                        if (var27) {
                           var22.h(true);
                           var22.h = var22.i = -1;
                           var22.f = var22.g = (byte)(var1 - this.c.i - 1 - var10.b);
                        }
                     } else {
                        var11 = var1 - this.c.i - 1;
                        var25 = this.b(var7, var11, 2);
                        var10 = (zbrd)this.t.get(var25);

                        for(var13 = 0; var13 <= var11; ++var13) {
                           var28 = new zbqw();
                           com.aspose.cells.b.a.a.ze.a(var22.e, (Object)var28);
                           var28.b(this.c.getColumnFields().get(var13).getBaseIndex());
                           var28.b((byte)var13);
                           var28.a((byte)2);
                           var28.a(true);
                           var28.a((int)1);
                           com.aspose.cells.b.a.a.ze.a(var28.c, (Object)var10.f[var13]);
                        }

                        var22.h(true);
                        var22.h = var22.i = (byte)(var7 - var25);
                        var22.f = var22.g = -1;
                     }

                     this.a(var19);
                     return;
                  }
               }
            }

            if (this.v == 0 && this.u > 0 && this.q != 1 && var1 == this.c.n - 1 && var2 >= this.c.o) {
               var16 = new zbqy(this.c.ag);
               this.c.ag.a(var16);
               var16.b = this.c.a.b.c().getDxfs().a(var3);
               var17 = new zbro();
               var16.c = var17;
               var17.a(false);
               var17.a((byte)8);
               var17.a = (byte)(var2 - this.c.o);
               this.a(var16);
               return;
            }

            if (this.u > 0) {
               if (var1 == this.c.n - 1 && var2 < this.c.o) {
                  var16 = new zbqy(this.c.ag);
                  this.c.ag.a(var16);
                  var16.b = this.c.a.b.c().getDxfs().a(var3);
                  var17 = new zbro();
                  var16.c = var17;
                  var17.a(false);
                  var17.b(true);
                  var17.b((byte)5);
                  var17.a = (byte)(var2 - this.c.k);
                  var17.a((byte)1);
                  var17.b = (byte)this.c.getRowFields().get(var17.a & 255).getBaseIndex();
                  this.a(var16);
                  return;
               }

               if (var1 >= this.c.n && var2 < this.c.o) {
                  var6 = var1 - this.c.n;
                  if (var6 < this.s.size()) {
                     var20 = new zbqy(this.c.ag);
                     this.c.ag.a(var20);
                     var20.b = this.c.a.b.c().getDxfs().a(var3);
                     var21 = new zbro();
                     var20.c = var21;
                     var21.a(false);
                     var21.b(true);
                     zbrd var23 = (zbrd)this.s.get(var6);
                     int var24 = this.c(var23.b);
                     if (var23.c == 13) {
                        var21.c(true);
                        var21.h(true);
                        var21.h = var21.i = (byte)(var2 - this.c.k - var24);
                        var21.f = var21.g = -1;
                        this.a(var20);
                        return;
                     }

                     if (var2 - this.c.k >= var24) {
                        var11 = Math.min(var23.e - 1, var2 - this.c.k);
                        boolean var26 = false;
                        var13 = 0;

                        while(true) {
                           if (var13 > var11) {
                              if (var26 || var11 < this.u - 1 && this.c.getRowFields().get(var11).getShowInOutlineForm()) {
                                 var21.h(true);
                                 var21.h = var21.i = (byte)(var2 - this.c.k - var24);
                                 var21.f = var21.g = -1;
                              }
                              break;
                           }

                           var28 = new zbqw();
                           com.aspose.cells.b.a.a.ze.a(var21.e, (Object)var28);
                           var28.b(this.c.getRowFields().get(var13).getBaseIndex());
                           var28.b((byte)var13);
                           var28.a((byte)1);
                           var28.a(true);
                           if (var13 == var23.e - 1) {
                              if (var23.c != 0 && var23.c != 14 && var23.c != 13) {
                                 var26 = true;
                                 var28.a(this.f(var23.c));
                              } else {
                                 var28.a((int)1);
                              }
                           } else {
                              var28.a((int)1);
                           }

                           com.aspose.cells.b.a.a.ze.a(var28.c, (Object)var23.f[var13]);
                           ++var13;
                        }
                     } else {
                        var11 = var2 - this.c.k;
                        var25 = this.e(var11);
                        var13 = this.b(var6, var25, 1);
                        var23 = (zbrd)this.s.get(var13);

                        for(int var14 = 0; var14 < var23.e; ++var14) {
                           zbqw var15 = new zbqw();
                           com.aspose.cells.b.a.a.ze.a(var21.e, (Object)var15);
                           var15.b(this.c.getRowFields().get(var14).getBaseIndex());
                           var15.b((byte)var14);
                           var15.a((byte)1);
                           var15.a(true);
                           var15.a((int)1);
                           com.aspose.cells.b.a.a.ze.a(var15.c, (Object)var23.f[var14]);
                        }

                        var21.h(true);
                        var21.h = var21.i = -1;
                        var21.f = var21.g = (byte)(var6 - var13);
                     }

                     this.a(var20);
                  }

                  return;
               }
            }

            if (this.u == 0 && this.v > 0 && this.q != 2 && var1 == this.c.n && var2 == this.c.o - 1) {
               var16 = new zbqy(this.c.ag);
               this.c.ag.a(var16);
               var16.b = this.c.a.b.c().getDxfs().a(var3);
               var17 = new zbro();
               var16.c = var17;
               var17.a(false);
               var17.b(true);
               var17.a((byte)8);
               var17.a = 0;
               this.a(var16);
               return;
            }

            if (this.u > 0 || this.v > 0) {
               if (var1 >= this.c.n && var2 >= this.c.o) {
                  var6 = var1 - this.c.n;
                  var7 = var2 - this.c.o;
                  var19 = new zbqy(this.c.ag);
                  this.c.ag.a(var19);
                  var19.b = this.c.a.b.c().getDxfs().a(var3);
                  var22 = new zbro();
                  var19.c = var22;
                  var22.a(true);
                  var22.b(false);
                  zbqw var12;
                  if (var6 < this.s.size() && this.u > 0) {
                     var10 = (zbrd)this.s.get(var6);
                     if (var10.c == 13) {
                        var22.c(true);
                     } else {
                        for(var11 = 0; var11 < var10.e; ++var11) {
                           var12 = new zbqw();
                           com.aspose.cells.b.a.a.ze.a(var22.e, (Object)var12);
                           var12.b(this.c.getRowFields().get(var11).getBaseIndex());
                           var12.b((byte)var11);
                           var12.a((byte)1);
                           if (var11 == var10.e - 1) {
                              if (var10.c != 0 && var10.c != 14 && var10.c != 13) {
                                 var12.a(this.f(var10.c));
                              } else {
                                 var22.j = true;
                                 var12.a((int)1);
                              }
                           } else {
                              var12.a((int)1);
                           }

                           com.aspose.cells.b.a.a.ze.a(var12.c, (Object)this.a(var10.f[var11], 1, this.c.getRowFields().get(var11).getPosition()));
                        }
                     }
                  }

                  if (var7 < this.t.size() && this.v > 0) {
                     var10 = (zbrd)this.t.get(var7);
                     if (var10.c == 13) {
                        var22.d(true);
                     } else {
                        for(var11 = 0; var11 < var10.e; ++var11) {
                           var12 = new zbqw();
                           com.aspose.cells.b.a.a.ze.a(var22.e, (Object)var12);
                           var12.b(this.c.getColumnFields().get(var11).getBaseIndex());
                           var12.b((byte)var11);
                           var12.a((byte)2);
                           if (var11 == var10.e - 1) {
                              if (var10.c != 0 && var10.c != 14 && var10.c != 13) {
                                 var12.a(this.f(var10.c));
                              } else {
                                 var12.a((int)1);
                              }
                           } else {
                              var12.a((int)1);
                           }

                           com.aspose.cells.b.a.a.ze.a(var12.c, (Object)this.a(var10.f[var11], 2, this.c.getColumnFields().get(var11).getPosition()));
                        }
                     }
                  }

                  this.a(var19);
                  return;
               } else {
                  return;
               }
            }
         }

      }
   }

   private int a(int var1, int var2, int var3) {
      int[] var4 = null;
      if (var2 == 1 && this.z.v != null) {
         var4 = this.z.v[var3];
      } else if (var2 == 2 && this.z.u != null) {
         var4 = this.z.u[var3];
      }

      if (var4 == null) {
         return var1;
      } else {
         if (var1 < var4.length) {
            for(int var5 = 0; var5 < var4.length; ++var5) {
               if (var4[var5] == var1) {
                  return var5;
               }
            }
         }

         return -1;
      }
   }

   private int b(int var1, int var2, int var3) {
      ArrayList var4 = null;
      if (var3 == 1) {
         var4 = this.s;
      } else {
         var4 = this.t;
      }

      for(int var5 = var1 - 1; var5 >= 0; ++var5) {
         zbrd var6 = (zbrd)var4.get(var5);
         if (var6.b <= var2) {
            return var5;
         }
      }

      return 0;
   }

   private int e(int var1) {
      int var2 = 0;

      for(int var3 = 0; var3 < this.u - 1; ++var3) {
         if (!this.c.getRowFields().get(var3).getShowInOutlineForm() || !this.c.getRowFields().get(var3).getShowCompact()) {
            ++var2;
            if (var2 > var1) {
               return var3;
            }
         }
      }

      return this.u - 1;
   }

   private int f(int var1) {
      short var2 = 1;
      switch(var1) {
      case 1:
         var2 = 2;
         break;
      case 2:
         var2 = 4;
         break;
      case 3:
         var2 = 8;
         break;
      case 4:
         var2 = 256;
         break;
      case 5:
         var2 = 16;
         break;
      case 6:
         var2 = 32;
         break;
      case 7:
         var2 = 64;
         break;
      case 8:
         var2 = 128;
         break;
      case 9:
         var2 = 512;
         break;
      case 10:
         var2 = 1024;
         break;
      case 11:
         var2 = 2048;
         break;
      case 12:
         var2 = 4096;
      }

      return var2;
   }

   void e() {
      ConditionalFormattingCollection var1 = this.c.a.b.getConditionalFormattings();
      int var2 = var1.getCount();
      int var3 = this.c.getPivotFormatConditions().getCount();
      if (var2 != 0 && var3 != 0) {
         for(int var4 = 0; var4 < var3; ++var4) {
            PivotFormatCondition var5 = this.c.getPivotFormatConditions().get(var4);
            ArrayList var6 = var5.b;
            ArrayList var7 = new ArrayList();

            int var8;
            for(var8 = 0; var8 < var6.size(); ++var8) {
               zbro var9 = (zbro)var6.get(var8);
               ArrayList var10 = this.a(var9);
               var10 = this.a(var10);
               if (var10.size() > 0 && var10.get(0) instanceof CellArea) {
                  com.aspose.cells.b.a.a.ze.a(var7, var10.get(0));
               }
            }

            if (var7.size() > 0) {
               for(var8 = 0; var8 < var2; ++var8) {
                  FormatConditionCollection var11 = var1.get(var8);
                  if (var11.d && var11.getCount() > 0 && var11.get(0).getPriority() == var5.c) {
                     var11.b = var7;
                     break;
                  }
               }
            }
         }

      }
   }

   private ArrayList a(ArrayList var1) {
      ArrayList var2 = new ArrayList();
      int var3 = -1;
      int var4 = -1;
      int var5 = 1;
      int var6 = 1;
      boolean var7 = true;
      boolean var8 = true;
      Cells var9 = this.c.a.b.getCells();

      for(int var10 = 0; var10 < var1.size(); ++var10) {
         int var14 = ((int[])((int[])var1.get(var10)))[0];
         int var15 = ((int[])((int[])var1.get(var10)))[1];
         if (var14 >= this.c.n && var15 >= this.c.o) {
            Cell var11 = var9.a(var14, var15, false);
            if (-1 == var3) {
               var3 = var11.getRow();
            }

            if (-1 == var4) {
               var4 = var11.getColumn();
            }

            if (var11.getRow() == var3 && var11.getColumn() == var4) {
               com.aspose.cells.b.a.a.ze.a(var2, var1.get(var10));
            } else {
               CellArea var12;
               Object var13;
               if (var11.getRow() == var3 + var5 && var11.getColumn() == var4) {
                  ++var5;
                  if (var10 == var1.size() - 1) {
                     var12 = CellArea.createCellArea(var3, var4, var3 + var5 - 1, var4 + var6 - 1);
                     var13 = var2.get(var2.size() - 1);
                     if (!(var13 instanceof CellArea) && ((int[])((int[])var13))[0] == var3 && ((int[])((int[])var13))[1] == var4) {
                        var2.remove(var2.size() - 1);
                     }

                     com.aspose.cells.b.a.a.ze.a(var2, (Object)var12);
                     var3 = var14;
                     var4 = var15;
                     var5 = 1;
                     var6 = 1;
                  }
               } else if (var11.getRow() == var3 && var11.getColumn() == var4 + var6) {
                  ++var6;
                  if (var10 == var1.size() - 1) {
                     var12 = CellArea.createCellArea(var3, var4, var3 + var5 - 1, var4 + var6 - 1);
                     var13 = var2.get(var2.size() - 1);
                     if (!(var13 instanceof CellArea) && ((int[])((int[])var13))[0] == var3 && ((int[])((int[])var13))[1] == var4) {
                        var2.remove(var2.size() - 1);
                     }

                     com.aspose.cells.b.a.a.ze.a(var2, (Object)var12);
                     var3 = var14;
                     var4 = var15;
                     var5 = 1;
                     var6 = 1;
                  }
               } else if (var11.getRow() == var3 + var5 - 1 && var11.getColumn() < var4 + var6 && var10 == var1.size() - 1) {
                  var12 = CellArea.createCellArea(var3, var4, var3 + var5 - 1, var4 + var6 - 1);
                  var13 = var2.get(var2.size() - 1);
                  if (!(var13 instanceof CellArea) && ((int[])((int[])var13))[0] == var3 && ((int[])((int[])var13))[1] == var4) {
                     var2.remove(var2.size() - 1);
                  }

                  com.aspose.cells.b.a.a.ze.a(var2, (Object)var12);
                  var3 = var14;
                  var4 = var15;
                  var5 = 1;
                  var6 = 1;
               }
            }
         }
      }

      return var2;
   }

   void f() {
      if (!this.b) {
         for(int var1 = 0; var1 < this.c.ag.getCount(); ++var1) {
            zbqy var2 = this.c.ag.a(var1);
            this.a(var2);
         }

         if (this.c.getMergeLabels() && this.I()) {
            this.H();
            this.G();
         }

      }
   }

   private void G() {
      Cells var1 = this.c.a.b.getCells();
      Cell var2 = null;
      String var3 = null;
      Style var4 = null;
      int var5 = -1;

      int var6;
      int var7;
      int var11;
      int var12;
      int var16;
      Range var17;
      Range var18;
      for(var6 = this.c.k; var6 < this.c.o; ++var6) {
         var7 = 1;
         boolean var8 = false;

         for(int var9 = this.c.n; var9 <= this.c.j; ++var9) {
            var2 = var1.get(var9, var6);
            var3 = var2.getStringValue();
            Range var10;
            if (!"".equals(var3) && null != var3) {
               var8 = true;
               if (var7 > 1) {
                  var1.merge(var5, var6, var7, 1);
                  var10 = var1.createRange(var5, var6, var7, 1);
                  var4.setHorizontalAlignment(1);
                  var4.setVerticalAlignment(1);
                  var4.setTextWrapped(true);
                  var10.setStyle(var4);
                  var5 = var9;
                  var4 = var2.getStyle();
                  var7 = 1;
                  if (var9 + 1 <= this.c.j && var1.get(var9 + 1, var6).getStringValue() != null && !var1.get(var9 + 1, var6).getStringValue().equals("") || var9 == this.c.j || this.a(var1.get(var9 + 1, var6))) {
                     var11 = 1;

                     for(var12 = var6 + 1; var12 < this.c.o && (var1.get(var5, var12).getStringValue() == null || "".equals(var1.get(var5, var12).getStringValue())); ++var12) {
                        ++var11;
                     }

                     if (var11 > 1) {
                        var1.merge(var5, var6, 1, var11);
                        var18 = var1.createRange(var5, var6, 1, var11);
                        var4.setHorizontalAlignment(1);
                        var4.setVerticalAlignment(1);
                        var4.setTextWrapped(true);
                        var18.setStyle(var4);
                     }
                  }
               } else {
                  var5 = var9;
                  var4 = var2.getStyle();
                  if (var9 + 1 <= this.c.j && var1.get(var9 + 1, var6).getStringValue() != null && !var1.get(var9 + 1, var6).getStringValue().equals("") || var9 == this.c.j || this.a(var1.get(var9 + 1, var6))) {
                     var16 = 1;

                     for(var11 = var6 + 1; var11 < this.c.o && (var1.get(var5, var11).getStringValue() == null || "".equals(var1.get(var5, var11).getStringValue())); ++var11) {
                        ++var16;
                     }

                     if (var16 > 1) {
                        var1.merge(var5, var6, 1, var16);
                        var17 = var1.createRange(var5, var6, 1, var16);
                        var4.setHorizontalAlignment(1);
                        var4.setVerticalAlignment(1);
                        var4.setTextWrapped(true);
                        var17.setStyle(var4);
                     }
                  }
               }
            } else if (var8 && !this.a(var2) && var2.getRow() == var5 + var7) {
               ++var7;
               if (var9 == this.c.j) {
                  var1.merge(var5, var9, var7, 1);
                  var10 = var1.createRange(var5, var9, var7, 1);
                  var4.setHorizontalAlignment(1);
                  var4.setVerticalAlignment(1);
                  var4.setTextWrapped(true);
                  var10.setStyle(var4);
                  var5 = var9;
                  var4 = var2.getStyle();
                  var7 = 1;
               }
            }
         }
      }

      var6 = this.v > 0 ? this.c.i + 1 : this.c.i;

      for(var7 = this.c.o; var7 <= this.c.l; ++var7) {
         int var14 = 1;
         boolean var15 = false;

         for(var16 = var6; var16 < this.c.n; ++var16) {
            var2 = var1.get(var16, var7);
            var3 = var2.getStringValue();
            if (!"".equals(var3) && null != var3) {
               var15 = true;
               if (var14 > 1) {
                  var1.merge(var5, var7, var14, 1);
                  var17 = var1.createRange(var5, var7, var14, 1);
                  var4.setHorizontalAlignment(1);
                  var4.setVerticalAlignment(1);
                  var4.setTextWrapped(true);
                  var17.setStyle(var4);
                  var5 = var16;
                  var4 = var2.getStyle();
                  var14 = 1;
                  if (var16 + 1 < this.c.n && var1.get(var16 + 1, var7).getStringValue() != null && !var1.get(var16 + 1, var7).getStringValue().equals("") || this.a(var1.get(var16 + 1, var7))) {
                     var12 = 1;

                     for(int var13 = var7 + 1; var13 < this.c.l && (var1.get(var5, var13).getStringValue() == null || "".equals(var1.get(var5, var13).getStringValue())); ++var13) {
                        ++var12;
                     }

                     if (var12 > 1) {
                        var1.merge(var5, var7, 1, var12);
                        Range var19 = var1.createRange(var5, var7, 1, var12);
                        var4.setHorizontalAlignment(1);
                        var4.setVerticalAlignment(1);
                        var4.setTextWrapped(true);
                        var19.setStyle(var4);
                     }
                  }
               } else {
                  var5 = var16;
                  var4 = var2.getStyle();
                  if (var16 + 1 < this.c.n && var1.get(var16 + 1, var7).getStringValue() != null && !var1.get(var16 + 1, var7).getStringValue().equals("") || this.a(var1.get(var16 + 1, var7))) {
                     var11 = 1;

                     for(var12 = var7 + 1; var12 < this.c.l && (var1.get(var5, var12).getStringValue() == null || "".equals(var1.get(var5, var12).getStringValue())); ++var12) {
                        ++var11;
                     }

                     if (var11 > 1) {
                        var1.merge(var5, var7, 1, var11);
                        var18 = var1.createRange(var5, var7, 1, var11);
                        var4.setHorizontalAlignment(1);
                        var4.setVerticalAlignment(1);
                        var4.setTextWrapped(true);
                        var18.setStyle(var4);
                     }
                  }
               }
            } else if (var15 && !this.a(var2)) {
               ++var14;
               if (var16 == this.c.n - 1) {
                  var1.merge(var5, var7, var14, 1);
                  var17 = var1.createRange(var5, var7, var14, 1);
                  var4.setHorizontalAlignment(1);
                  var4.setVerticalAlignment(1);
                  var4.setTextWrapped(true);
                  var17.setStyle(var4);
                  var5 = var16;
                  var4 = var2.getStyle();
                  var14 = 1;
               }
            }
         }
      }

   }

   private boolean a(Cell var1) {
      zani var2 = this.c.a.b.getCells().q();
      if (null != var2) {
         for(int var3 = 0; var3 < var2.getCount(); ++var3) {
            CellArea var4 = var2.a(var3);
            if (var4.StartRow >= this.c.i && var4.EndRow <= this.c.j && var4.StartColumn >= this.c.k && var4.EndColumn <= this.c.l && var1.getRow() >= var4.StartRow && var1.getRow() <= var4.EndRow && var1.getColumn() >= var4.StartColumn && var1.getColumn() <= var4.EndColumn) {
               return true;
            }
         }
      }

      return false;
   }

   private void H() {
      zani var1 = this.c.a.b.getCells().q();
      if (null != var1) {
         for(int var2 = 0; var2 < var1.getCount(); ++var2) {
            CellArea var3 = var1.a(var2);
            if (var3.StartRow >= this.c.i && var3.EndRow <= this.c.j && var3.StartColumn >= this.c.k && var3.EndColumn <= this.c.l) {
               var1.removeAt(var2);
               --var2;
            }
         }
      }

   }

   private boolean I() {
      zani var1 = this.c.a.b.getCells().q();
      if (null != var1) {
         for(int var2 = 0; var2 < var1.getCount(); ++var2) {
            CellArea var3 = var1.a(var2);
            if (var3.StartRow >= this.c.i && var3.EndRow <= this.c.j && var3.StartColumn >= this.c.k && var3.EndColumn <= this.c.l) {
               return true;
            }
         }
      }

      return false;
   }

   private void a(Style var1, Style var2) {
      if (var2.isModified(11)) {
         if (var2.isModified(13)) {
            var1.getFont().a(var2.getFont().getName(), var2.getFont().k());
         }

         if (var2.isModified(12)) {
            var1.getFont().setSize(var2.getFont().getSize());
         }

         if (var2.isModified(16)) {
            var1.getFont().b.f(var2.getFont().b);
            var1.b(16);
         }

         if (var2.isModified(18)) {
            var1.getFont().setItalic(var2.getFont().isItalic());
         }

         if (var2.isModified(17)) {
            var1.getFont().setBold(var2.getFont().isBold());
         }

         if (var2.isModified(19)) {
            var1.getFont().setUnderline(var2.getFont().getUnderline());
         }

         if (var2.isModified(23)) {
            var1.getFont().a(var2.getFont().f());
         }

         if (var2.isModified(20)) {
            var1.getFont().setStrikeout(var2.getFont().isStrikeout());
         }
      }

      if (var2.isModified(1)) {
         if (var2.isModified(2) && var2.getBorders().getByBorderType(1).getLineStyle() != 0) {
            var1.getBorders().getByBorderType(1).a(var2.getBorders().getByBorderType(1));
            var1.b(2);
         }

         if (var2.isModified(3) && var2.getBorders().getByBorderType(2).getLineStyle() != 0) {
            var1.getBorders().getByBorderType(2).a(var2.getBorders().getByBorderType(2));
            var1.b(3);
         }

         if (var2.isModified(4) && var2.getBorders().getByBorderType(4).getLineStyle() != 0) {
            var1.getBorders().getByBorderType(4).a(var2.getBorders().getByBorderType(4));
            var1.b(4);
         }

         if (var2.isModified(5) && var2.getBorders().getByBorderType(8).getLineStyle() != 0) {
            var1.getBorders().getByBorderType(8).a(var2.getBorders().getByBorderType(8));
            var1.b(5);
         }

         if (var2.isModified(10) && var2.getBorders().getByBorderType(32).getLineStyle() != 0) {
            var1.getBorders().getByBorderType(32).a(var2.getBorders().getByBorderType(32));
            var1.b(10);
         }

         if (var2.isModified(9) && var2.getBorders().getByBorderType(16).getLineStyle() != 0) {
            var1.getBorders().getByBorderType(16).a(var2.getBorders().getByBorderType(16));
            var1.b(9);
         }
      }

      if (var2.isModified(32)) {
         if (var1.isGradient()) {
            var1.setGradient(false);
         }

         if (var2.isModified(33)) {
            var1.setPattern(var2.getPattern());
         }

         if (var2.isModified(34)) {
            var1.b.f(var2.b);
            var1.b(34);
            if (var1.getPattern() == 0 && !var2.isModified(35)) {
               var1.setPattern(1);
            }
         }

         if (var2.isModified(35)) {
            if (var1.getPattern() != 0 && var1.getPattern() != 1) {
               var1.a.f(var2.a);
               var1.b(35);
            } else {
               var1.setGradient(false);
               var1.setPattern(1);
               var1.b.f(var2.a);
               var1.b(34);
            }
         }
      }

      if (var2.isGradient()) {
         var1.setGradient(true);
         var1.f(var2.w());
         var1.e(var2.v());
         var1.setForegroundColor(var2.getForegroundColor());
         var1.b(34);
         var1.setBackgroundColor(var2.getBackgroundColor());
         var1.b(35);
      }

      if (var2.isModified(25)) {
         var1.setHorizontalAlignment(var2.getHorizontalAlignment());
      }

      if (var2.isModified(26)) {
         var1.setVerticalAlignment(var2.getVerticalAlignment());
      }

      if (var2.isModified(28)) {
         var1.setRotationAngle(var2.getRotationAngle());
      }

      if (var2.isModified(27)) {
         var1.setIndentLevel(var2.getIndentLevel());
      }

      if (var2.isModified(24)) {
         var1.setCustom(var2.getCustom());
         var1.d(var2.getNumber());
      }

      if (var2.isModified(29)) {
         var1.setTextWrapped(var2.isTextWrapped());
      }

      if (var2.isModified(30)) {
         var1.setShrinkToFit(var2.getShrinkToFit());
      }

   }

   private void a(zbqy var1) {
      Style var2 = var1.a();
      int var3 = var1.a & 255;
      ArrayList var4 = this.a(var1.c);

      for(int var5 = 0; var5 < var4.size(); ++var5) {
         Cell var6 = this.c.a.b.getCells().a(((int[])((int[])var4.get(var5)))[0], ((int[])((int[])var4.get(var5)))[1], false);
         if (var3 == 1) {
            Style var7 = var6.getStyle();
            if (var2 != null) {
               this.a(var7, var2);
            }

            if (this.c.getMergeLabels()) {
               if (var6.getRow() < this.c.n) {
                  var7.setHorizontalAlignment(1);
                  if (var6.getRow() > this.c.i && var6.getColumn() >= this.c.o) {
                     var7.setVerticalAlignment(1);
                     var7.setTextWrapped(true);
                  }
               } else if (var6.getColumn() < this.c.o) {
                  var7.setHorizontalAlignment(1);
                  var7.setVerticalAlignment(1);
                  var7.setTextWrapped(true);
               }
            }

            var6.a(var7, true);
         } else if (var3 == 0) {
            var6.a(new Style(this.c.a.b.c()));
         }
      }

   }

   private ArrayList a(zbro var1) {
      ArrayList var2 = new ArrayList();
      int var3;
      if (var1.g() == 6) {
         if (var1.j()) {
            if ((var1.h & 255) == 255) {
               com.aspose.cells.b.a.a.ze.a(var2, (Object)(new int[]{this.c.i, this.c.l}));
            } else {
               for(var3 = var1.h & 255; var3 <= (var1.i & 255); ++var3) {
                  com.aspose.cells.b.a.a.ze.a(var2, (Object)(new int[]{this.c.i, this.c.o + this.v + var3}));
               }
            }
         } else {
            for(var3 = this.c.o + this.v; var3 <= this.c.l; ++var3) {
               com.aspose.cells.b.a.a.ze.a(var2, (Object)(new int[]{this.c.i, var3}));
            }
         }
      } else if (var1.g() == 5) {
         if (var1.f() == 1) {
            if (this.c.k + (var1.a & 255) < this.c.o) {
               com.aspose.cells.b.a.a.ze.a(var2, (Object)(new int[]{this.c.n - 1, this.c.k + (var1.a & 255)}));
            }
         } else if (var1.f() == 2) {
            com.aspose.cells.b.a.a.ze.a(var2, (Object)(new int[]{this.c.i, this.c.o + (var1.a & 255)}));
         } else if (var1.f() == 4) {
            com.aspose.cells.b.a.a.ze.a(var2, (Object)(new int[]{this.c.i - 1 - this.x + (var1.a & 255), this.c.k}));
         }
      } else {
         int var8;
         if (var1.g() == 4) {
            if (var1.j()) {
               ArrayList var7 = new ArrayList();
               ArrayList var4 = new ArrayList();
               int var5;
               if ((var1.h & 255) == 255) {
                  com.aspose.cells.b.a.a.ze.a(var7, (Object)(this.c.o - 1));
               } else {
                  for(var5 = var1.h & 255; var5 <= (var1.i & 255); ++var5) {
                     com.aspose.cells.b.a.a.ze.a(var7, (Object)(this.c.k + var5));
                  }
               }

               if ((var1.f & 255) == 255) {
                  com.aspose.cells.b.a.a.ze.a(var4, (Object)(this.c.n - 2));
               } else {
                  for(var5 = var1.f & 255; var5 <= (var1.g & 255); ++var5) {
                     com.aspose.cells.b.a.a.ze.a(var4, (Object)(this.c.i + var5));
                  }
               }

               for(var5 = 0; var5 < var4.size(); ++var5) {
                  for(int var6 = 0; var6 < var7.size(); ++var6) {
                     com.aspose.cells.b.a.a.ze.a(var2, (Object)(new int[]{(Integer)var4.get(var5), (Integer)var7.get(var6)}));
                  }
               }
            } else {
               for(var3 = this.c.i; var3 <= this.c.n - 2; ++var3) {
                  for(var8 = this.c.k; var8 <= this.c.o - 1; ++var8) {
                     com.aspose.cells.b.a.a.ze.a(var2, (Object)(new int[]{var3, var8}));
                  }
               }
            }
         } else if (var1.g() == 3) {
            if (this.x > 0) {
               for(var3 = this.c.i - 1 - this.x; var3 < this.c.i - 1; ++var3) {
                  for(var8 = this.c.k; var8 <= this.c.k + 1; ++var8) {
                     com.aspose.cells.b.a.a.ze.a(var2, (Object)(new int[]{var3, var8}));
                  }
               }
            }

            for(var3 = this.c.i; var3 <= this.c.j; ++var3) {
               for(var8 = this.c.k; var8 <= this.c.l; ++var8) {
                  com.aspose.cells.b.a.a.ze.a(var2, (Object)(new int[]{var3, var8}));
               }
            }
         } else if (!var1.d() && !var1.c()) {
            if (var1.a()) {
               this.a(var1.e, var2, var1.j);
            } else if (var1.b()) {
               this.a(var1.e, var2, var1);
            } else {
               this.a(var1.e, var2, var1);
               this.a(var1.e, var2, var1.j);
            }
         } else if (var1.c() && var1.d()) {
            this.a(var1.e, var2, var1, true, true);
         } else if (var1.c()) {
            if (var1.a()) {
               if (var1.e.size() == 0) {
                  for(var3 = this.c.k; var3 <= this.c.l; ++var3) {
                     com.aspose.cells.b.a.a.ze.a(var2, (Object)(new int[]{this.c.j, var3}));
                  }
               } else {
                  this.a(var1.e, var2, var1, true, false);
               }
            } else if (var1.b()) {
               this.a(var1.e, var2, var1, true);
            } else {
               for(var3 = this.c.k; var3 <= this.c.l; ++var3) {
                  com.aspose.cells.b.a.a.ze.a(var2, (Object)(new int[]{this.c.j, var3}));
               }
            }
         } else if (var1.d()) {
            if (var1.a()) {
               if (!var1.j || var1.e.size() != 0 && (var1.e.size() != 1 || (((zbqw)((zbqw)var1.e.get(0))).b() & '\uffff') != 65534)) {
                  this.a(var1.e, var2, var1, false, true);
               } else {
                  for(var3 = this.c.i; var3 <= this.c.j; ++var3) {
                     com.aspose.cells.b.a.a.ze.a(var2, (Object)(new int[]{var3, this.c.l}));
                  }
               }
            } else if (var1.b()) {
               this.a(var1.e, var2, var1, false);
            } else {
               for(var3 = this.c.i; var3 <= this.c.j; ++var3) {
                  com.aspose.cells.b.a.a.ze.a(var2, (Object)(new int[]{var3, this.c.l}));
               }
            }
         }
      }

      return var2;
   }

   private void a(ArrayList var1, ArrayList var2, zbro var3) {
      ArrayList var4 = new ArrayList();
      ArrayList var5 = new ArrayList();
      ArrayList var6 = new ArrayList();
      this.a(var1, var4, var5, var6);
      int var17;
      if (var4.size() == 0 && var5.size() == 0 && var6.size() == 0) {
         if (var1.size() == 0 && var3.f() == 8 && var3.a == 0) {
            if (this.u == 0 && this.v > 0 && this.w == 1) {
               com.aspose.cells.b.a.a.ze.a(var2, (Object)(new int[]{this.c.n, this.c.k}));
            } else if (this.v == 0 && this.u > 0 && this.w == 1) {
               com.aspose.cells.b.a.a.ze.a(var2, (Object)(new int[]{this.c.i, this.c.o}));
            } else if (this.v == 0 && this.u == 0) {
               com.aspose.cells.b.a.a.ze.a(var2, (Object)(new int[]{this.c.i, this.c.k}));
            } else if (this.w != 0) {
               for(var17 = this.c.o; var17 <= this.c.l; ++var17) {
                  com.aspose.cells.b.a.a.ze.a(var2, (Object)(new int[]{this.c.i, var17}));
               }
            }
         }

      } else {
         int var16;
         if (var6.size() > 0) {
            for(var17 = 0; var17 < var6.size(); ++var17) {
               int var15 = ((zbqw)var6.get(var17)).b() & '\uffff';
               if (var15 != -2) {
                  var16 = this.c.getBaseFields().get(var15).getPosition();
                  com.aspose.cells.b.a.a.ze.a(var2, (Object)(new int[]{this.c.i - 1 - this.x + var16, this.c.k + 1}));
               }
            }

         } else if (var4.size() <= 0 || var5.size() <= 0) {
            ArrayList var7;
            short var8;
            boolean var9;
            int var10;
            ArrayList var11;
            ArrayList var12;
            int var13;
            int var14;
            int var18;
            if (var4.size() > 0) {
               var7 = this.a(var4, 1, var3.j);
               if (var7.size() == 0) {
                  return;
               }

               var8 = (short)(((zbqw)var4.get(var4.size() - 1)).b() & '\uffff');
               var9 = false;
               if (var8 == -2) {
                  var16 = this.r;
               } else {
                  var16 = this.c.getBaseFields().get(var8).getPosition();
               }

               var10 = this.c(var16);
               var11 = new ArrayList();
               if ((((zbqw)var4.get(var4.size() - 1)).a() & '\uffff') != 1 && !this.c.getRowFields().get(var16).k()) {
                  if (var3.j()) {
                     if ((var3.h & 255) == 255) {
                        com.aspose.cells.b.a.a.ze.a(var11, (Object)(this.c.o - 1 - this.c.k));
                     } else {
                        for(var18 = var10 + (var3.h & 255); var18 <= var10 + (var3.i & 255); ++var18) {
                           com.aspose.cells.b.a.a.ze.a(var11, (Object)var18);
                        }
                     }
                  } else {
                     for(var18 = var10; var18 < this.c.o - this.c.k; ++var18) {
                        com.aspose.cells.b.a.a.ze.a(var11, (Object)var18);
                     }
                  }
               } else if (var16 != this.u - 1 && this.c.getRowFields().get(var16).getShowInOutlineForm()) {
                  if (!var3.j()) {
                     com.aspose.cells.b.a.a.ze.a(var11, (Object)var10);
                  } else if ((var3.f & 255) == 255) {
                     if ((var3.h & 255) != 255) {
                        for(var18 = var10 + (var3.h & 255); var18 <= var10 + (var3.i & 255); ++var18) {
                           com.aspose.cells.b.a.a.ze.a(var11, (Object)var18);
                        }
                     } else {
                        var12 = new ArrayList();

                        for(var13 = 0; var13 < var7.size(); ++var13) {
                           com.aspose.cells.b.a.a.ze.a(var12, (Object)this.c((Integer)var7.get(var13), var16, 1));
                        }

                        var7 = var12;
                        com.aspose.cells.b.a.a.ze.a(var11, (Object)var10);
                     }
                  } else {
                     var12 = new ArrayList();
                     var13 = 0;

                     while(true) {
                        if (var13 >= var7.size()) {
                           var7 = var12;
                           com.aspose.cells.b.a.a.ze.a(var11, (Object)var10);
                           break;
                        }

                        for(var14 = var3.f & 255; var14 <= (var3.g & 255); ++var14) {
                           com.aspose.cells.b.a.a.ze.a(var12, (Object)((Integer)var7.get(var13) + var14));
                        }

                        ++var13;
                     }
                  }
               } else {
                  com.aspose.cells.b.a.a.ze.a(var11, (Object)var10);
               }

               for(var18 = 0; var18 < var7.size(); ++var18) {
                  for(var13 = 0; var13 < var11.size(); ++var13) {
                     com.aspose.cells.b.a.a.ze.a(var2, (Object)(new int[]{this.c.n + (Integer)var7.get(var18), this.c.k + (Integer)var11.get(var13)}));
                  }
               }
            }

            if (var5.size() > 0) {
               var7 = this.a(var5, 2, var3.j);
               if (var7.size() == 0) {
                  return;
               }

               var8 = (short)(((zbqw)var5.get(var5.size() - 1)).b() & '\uffff');
               var9 = false;
               if (var8 == -2) {
                  if (this.c.J && !this.c.D) {
                     var16 = this.r - 1;
                  } else {
                     var16 = this.r;
                  }
               } else {
                  var16 = this.c.getBaseFields().get(var8).getPosition();
               }

               var10 = var16 + 1;
               var11 = new ArrayList();
               if ((((zbqw)var5.get(var5.size() - 1)).a() & '\uffff') != 1) {
                  if (var3.j()) {
                     if ((var3.f & 255) == 255) {
                        com.aspose.cells.b.a.a.ze.a(var11, (Object)(this.c.n - 1 - this.c.i));
                     } else {
                        for(var18 = var10 + (var3.f & 255); var18 <= var10 + (var3.g & 255); ++var18) {
                           com.aspose.cells.b.a.a.ze.a(var11, (Object)var18);
                        }
                     }
                  } else {
                     for(var18 = var10; var18 <= this.c.n - 1 - this.c.i; ++var18) {
                        com.aspose.cells.b.a.a.ze.a(var11, (Object)var18);
                     }
                  }
               } else if (!var3.j()) {
                  com.aspose.cells.b.a.a.ze.a(var11, (Object)var10);
               } else if ((var3.h & 255) == 255) {
                  var12 = new ArrayList();

                  for(var13 = 0; var13 < var7.size(); ++var13) {
                     com.aspose.cells.b.a.a.ze.a(var12, (Object)this.c((Integer)var7.get(var13), var16, 2));
                  }

                  var7 = var12;
                  com.aspose.cells.b.a.a.ze.a(var11, (Object)var10);
               } else {
                  var12 = new ArrayList();
                  var13 = 0;

                  while(true) {
                     if (var13 >= var7.size()) {
                        var7 = var12;
                        com.aspose.cells.b.a.a.ze.a(var11, (Object)var10);
                        break;
                     }

                     for(var14 = var3.h & 255; var14 <= (var3.i & 255); ++var14) {
                        com.aspose.cells.b.a.a.ze.a(var12, (Object)((Integer)var7.get(var13) + var14));
                     }

                     ++var13;
                  }
               }

               for(var18 = 0; var18 < var11.size(); ++var18) {
                  for(var13 = 0; var13 < var7.size(); ++var13) {
                     com.aspose.cells.b.a.a.ze.a(var2, (Object)(new int[]{this.c.i + (Integer)var11.get(var18), this.c.o + (Integer)var7.get(var13)}));
                  }
               }
            }

         }
      }
   }

   private int c(int var1, int var2, int var3) {
      ArrayList var4 = null;
      if (var3 == 1) {
         var4 = this.s;
      } else {
         var4 = this.t;
      }

      for(int var5 = var1 + 1; var5 < var4.size(); ++var5) {
         zbrd var6 = (zbrd)var4.get(var5);
         if (var6.b <= var2) {
            return var5 - 1;
         }
      }

      return var4.size() - 1;
   }

   private void a(ArrayList var1, ArrayList var2, zbro var3, boolean var4, boolean var5) {
      ArrayList var6;
      ArrayList var7;
      ArrayList var8;
      ArrayList var9;
      int var15;
      int var16;
      if (var4 && var5) {
         if (this.c.getColumnGrand() && this.c.getRowGrand()) {
            var6 = new ArrayList();
            var7 = new ArrayList();
            var8 = new ArrayList();
            this.a(var1, var6, var7, var8);
            var9 = new ArrayList();
            zbqw var17;
            if (this.q == 1) {
               for(var15 = 0; var15 < var6.size(); ++var15) {
                  var17 = (zbqw)var6.get(var15);

                  for(var16 = 0; var16 < var17.c.size(); ++var16) {
                     com.aspose.cells.b.a.a.ze.a(var9, (Object)((Integer)var17.c.get(var16)));
                  }
               }

               for(var15 = 0; var15 < var9.size(); ++var15) {
                  com.aspose.cells.b.a.a.ze.a(var2, (Object)(new int[]{this.c.j - this.w + 1 + (Integer)var9.get(var15), this.c.l}));
               }
            } else if (this.q == 2) {
               for(var15 = 0; var15 < var7.size(); ++var15) {
                  var17 = (zbqw)var7.get(var15);

                  for(var16 = 0; var16 < var17.c.size(); ++var16) {
                     com.aspose.cells.b.a.a.ze.a(var9, (Object)((Integer)var17.c.get(var16)));
                  }
               }

               for(var15 = 0; var15 < var9.size(); ++var15) {
                  com.aspose.cells.b.a.a.ze.a(var2, (Object)(new int[]{this.c.j, this.c.l - this.w + 1 + (Integer)var9.get(var15)}));
               }
            } else {
               com.aspose.cells.b.a.a.ze.a(var2, (Object)(new int[]{this.c.j, this.c.l}));
            }
         }
      } else {
         ArrayList var10;
         int var11;
         zbqw var12;
         int var13;
         int var14;
         if (var4) {
            if (this.c.getColumnGrand()) {
               var6 = new ArrayList();
               var7 = new ArrayList();
               var8 = new ArrayList();
               if (var1.size() == 0) {
                  for(var14 = this.c.n; var14 <= this.c.j; ++var14) {
                     for(var15 = this.c.o; var15 <= this.c.l; ++var15) {
                        com.aspose.cells.b.a.a.ze.a(var2, (Object)(new int[]{var14, var15}));
                     }
                  }

                  return;
               }

               this.a(var1, var6, var7, var8);
               if (var7.size() == 0) {
                  return;
               }

               var9 = this.a(var7, 2, var3.j);
               if (this.q == 1) {
                  if (var6.size() > 0) {
                     var10 = new ArrayList();

                     for(var11 = 0; var11 < var6.size(); ++var11) {
                        var12 = (zbqw)var6.get(var11);

                        for(var13 = 0; var13 < var12.c.size(); ++var13) {
                           com.aspose.cells.b.a.a.ze.a(var10, (Object)((Integer)var12.c.get(var13)));
                        }
                     }

                     for(var11 = 0; var11 < var9.size(); ++var11) {
                        for(var16 = 0; var16 < var10.size(); ++var16) {
                           com.aspose.cells.b.a.a.ze.a(var2, (Object)(new int[]{this.c.j - this.w + 1 + (Integer)var10.get(var11), this.c.o + (Integer)var9.get(var11)}));
                        }
                     }
                  }
               } else {
                  for(var15 = 0; var15 < var9.size(); ++var15) {
                     com.aspose.cells.b.a.a.ze.a(var2, (Object)(new int[]{this.c.j, this.c.o + (Integer)var9.get(var15)}));
                  }
               }
            }
         } else if (var5 && this.c.getRowGrand()) {
            var6 = new ArrayList();
            var7 = new ArrayList();
            var8 = new ArrayList();
            this.a(var1, var6, var7, var8);
            if (var1.size() == 0) {
               for(var14 = this.c.n; var14 <= this.c.j; ++var14) {
                  for(var15 = this.c.o; var15 <= this.c.l; ++var15) {
                     com.aspose.cells.b.a.a.ze.a(var2, (Object)(new int[]{var14, var15}));
                  }
               }

               return;
            }

            if (var6.size() == 0) {
               return;
            }

            var9 = this.a(var6, 1, var3.j);
            if (this.q == 2) {
               if (var7.size() > 0) {
                  var10 = new ArrayList();

                  for(var11 = 0; var11 < var7.size(); ++var11) {
                     var12 = (zbqw)var7.get(var11);

                     for(var13 = 0; var13 < var12.c.size(); ++var13) {
                        com.aspose.cells.b.a.a.ze.a(var10, (Object)((Integer)var12.c.get(var13)));
                     }
                  }

                  for(var11 = 0; var11 < var9.size(); ++var11) {
                     for(var16 = 0; var16 < var10.size(); ++var16) {
                        com.aspose.cells.b.a.a.ze.a(var2, (Object)(new int[]{this.c.n + (Integer)var9.get(var11), this.c.l - this.w + 1 + (Integer)var10.get(var11)}));
                     }
                  }
               }
            } else {
               for(var15 = 0; var15 < var9.size(); ++var15) {
                  com.aspose.cells.b.a.a.ze.a(var2, (Object)(new int[]{this.c.n + (Integer)var9.get(var15), this.c.l}));
               }
            }
         }
      }

   }

   private void a(ArrayList var1, ArrayList var2, zbro var3, boolean var4) {
      boolean var5;
      ArrayList var6;
      ArrayList var7;
      ArrayList var8;
      ArrayList var9;
      int var10;
      zbqw var11;
      int var12;
      int var13;
      int var14;
      if (var4 && this.c.getColumnGrand()) {
         var5 = false;
         var6 = new ArrayList();
         if (this.q == 1) {
            var5 = true;
            var7 = new ArrayList();
            var8 = new ArrayList();
            var9 = new ArrayList();
            this.a(var1, var7, var8, var9);

            for(var10 = 0; var10 < var7.size(); ++var10) {
               var11 = (zbqw)var7.get(var10);

               for(var12 = 0; var12 < var11.c.size(); ++var12) {
                  com.aspose.cells.b.a.a.ze.a(var6, (Object)((Integer)var11.c.get(var12)));
               }
            }
         }

         if (var3.j()) {
            if ((var3.h & 255) == 255) {
               if (var5) {
                  for(var13 = 0; var13 < var6.size(); ++var13) {
                     com.aspose.cells.b.a.a.ze.a(var2, (Object)(new int[]{this.c.j - this.w + 1 + (Integer)var6.get(var13), this.c.o - 1}));
                  }
               } else {
                  com.aspose.cells.b.a.a.ze.a(var2, (Object)(new int[]{this.c.j, this.c.o - 1}));
               }
            } else {
               for(var13 = this.c.k + (var3.h & 255); var13 <= this.c.k + (var3.i & 255) && var13 < this.c.o + this.c.k; ++var13) {
                  if (var5) {
                     for(var14 = 0; var14 < var6.size(); ++var14) {
                        com.aspose.cells.b.a.a.ze.a(var2, (Object)(new int[]{this.c.j - this.w + 1 + (Integer)var6.get(var14), var13}));
                     }
                  } else {
                     com.aspose.cells.b.a.a.ze.a(var2, (Object)(new int[]{this.c.j, var13}));
                  }
               }
            }
         } else {
            for(var13 = 0; var13 <= this.c.o - 1 - this.c.k; ++var13) {
               if (var5) {
                  for(var14 = 0; var14 < var6.size(); ++var14) {
                     com.aspose.cells.b.a.a.ze.a(var2, (Object)(new int[]{this.c.j - this.w + 1 + (Integer)var6.get(var14), this.c.k + var13}));
                  }
               } else {
                  com.aspose.cells.b.a.a.ze.a(var2, (Object)(new int[]{this.c.j, this.c.k + var13}));
               }
            }
         }
      } else if (!var4 && this.c.getRowGrand()) {
         var5 = false;
         var6 = new ArrayList();
         if (this.q == 2) {
            var5 = true;
            var7 = new ArrayList();
            var8 = new ArrayList();
            var9 = new ArrayList();
            this.a(var1, var7, var8, var9);

            for(var10 = 0; var10 < var8.size(); ++var10) {
               var11 = (zbqw)var8.get(var10);

               for(var12 = 0; var12 < var11.c.size(); ++var12) {
                  com.aspose.cells.b.a.a.ze.a(var6, (Object)((Integer)var11.c.get(var12)));
               }
            }
         }

         var13 = this.c.i + 1;
         if (this.u == 0) {
            var13 = this.c.i;
         }

         int var15;
         if (var3.j()) {
            if ((var3.f & 255) == 255) {
               if (var5) {
                  for(var14 = 0; var14 < var6.size(); ++var14) {
                     com.aspose.cells.b.a.a.ze.a(var2, (Object)(new int[]{this.c.n - 1, this.c.l - this.w + 1 + (Integer)var6.get(var14)}));
                  }
               } else {
                  com.aspose.cells.b.a.a.ze.a(var2, (Object)(new int[]{this.c.n - 1, this.c.l}));
               }
            } else {
               for(var14 = var13 + (var3.f & 255); var14 <= var13 + (var3.g & 255); ++var14) {
                  if (var5) {
                     for(var15 = 0; var15 < var6.size(); ++var15) {
                        com.aspose.cells.b.a.a.ze.a(var2, (Object)(new int[]{var14, this.c.l - this.w + 1 + (Integer)var6.get(var15)}));
                     }
                  } else {
                     com.aspose.cells.b.a.a.ze.a(var2, (Object)(new int[]{var14, this.c.l}));
                  }
               }
            }
         } else {
            for(var14 = var13; var14 <= this.c.n - 1; ++var14) {
               if (var5) {
                  for(var15 = 0; var15 < var6.size(); ++var15) {
                     com.aspose.cells.b.a.a.ze.a(var2, (Object)(new int[]{var14, this.c.l - this.w + 1 + (Integer)var6.get(var15)}));
                  }
               } else {
                  com.aspose.cells.b.a.a.ze.a(var2, (Object)(new int[]{var14, this.c.l}));
               }
            }
         }
      }

   }

   private void a(ArrayList var1, ArrayList var2, boolean var3) {
      ArrayList var4 = new ArrayList();
      ArrayList var5 = new ArrayList();
      ArrayList var6 = new ArrayList();
      this.a(var1, var4, var5, var6);
      ArrayList var7 = null;
      ArrayList var8 = null;
      if (var4.size() > 0) {
         var7 = this.a(var4, 1, var3);
      }

      if (var5.size() > 0) {
         var8 = this.a(var5, 2, var3);
      }

      int var9;
      int var10;
      if (var7 == null && var8 == null) {
         for(var9 = this.c.n; var9 <= this.c.j; ++var9) {
            for(var10 = this.c.o; var10 <= this.c.l; ++var10) {
               com.aspose.cells.b.a.a.ze.a(var2, (Object)(new int[]{var9, var10}));
            }
         }

      } else if (var7 != null && var7.size() != 0 || var8 != null && var8.size() != 0) {
         if (var7 == null) {
            if (this.u == 0) {
               var7 = new ArrayList();
               com.aspose.cells.b.a.a.ze.a(var7, (Object)0);
            } else {
               var7 = this.a(1, (byte)2);
            }
         }

         if (var8 == null) {
            if (this.v == 0) {
               var8 = new ArrayList();
               com.aspose.cells.b.a.a.ze.a(var8, (Object)0);
            } else {
               var8 = this.a(2, (byte)2);
            }
         }

         for(var9 = 0; var9 < var7.size(); ++var9) {
            for(var10 = 0; var10 < var8.size(); ++var10) {
               com.aspose.cells.b.a.a.ze.a(var2, (Object)(new int[]{this.c.n + (Integer)var7.get(var9), this.c.o + (Integer)var8.get(var10)}));
            }
         }

      }
   }

   private void a(zbqw var1, ArrayList var2, int var3, boolean var4, byte var5, boolean var6, int var7) {
      ArrayList var8 = new ArrayList();
      int var9;
      zbrd var11;
      if (var1.c.size() > 0) {
         for(var9 = 0; var9 < var2.size(); ++var9) {
            boolean var10 = true;
            var11 = null;
            if (var3 == 1) {
               var11 = (zbrd)this.s.get((Integer)var2.get(var9));
            } else {
               var11 = (zbrd)this.t.get((Integer)var2.get(var9));
            }

            short var12 = (short)(var1.b() & '\uffff');
            boolean var13 = false;
            int var16;
            if (var12 != -2 && var12 != 254) {
               var16 = this.c.getBaseFields().get(var12).getPosition();
            } else {
               var16 = this.r;
            }

            if (var6 && var11.f() != var7) {
               var10 = true;
            } else if (var4 && var5 == 3 && var16 != var11.e - 1) {
               var10 = true;
            } else if (var16 > var11.e - 1) {
               var10 = true;
            } else {
               for(int var14 = 0; var14 < var1.c.size(); ++var14) {
                  if (var12 != -2 && var12 != 254) {
                     if (var11.f[var16] == this.d((Integer)var1.c.get(var14), var3, var16)) {
                        var10 = false;
                        break;
                     }
                  } else if (var11.f() == (Integer)var1.c.get(var14)) {
                     var10 = false;
                     break;
                  }
               }
            }

            if (var10) {
               com.aspose.cells.b.a.a.ze.a(var8, var2.get(var9));
            }
         }
      }

      if (!var1.e) {
         for(var9 = 0; var9 < var8.size(); ++var9) {
            int var15 = (Integer)var8.get(var9);
            var11 = null;
            if (var3 == 1) {
               var11 = (zbrd)this.s.get(var15);
            } else {
               var11 = (zbrd)this.t.get(var15);
            }

            if (var11.c()) {
               var8.remove(var9);
            }
         }
      }

      for(var9 = 0; var9 < var8.size(); ++var9) {
         var2.remove(var8.get(var9));
      }

   }

   private int d(int var1, int var2, int var3) {
      int[] var4 = null;
      if (var2 == 1 && this.z.v != null) {
         var4 = this.z.v[var3];
      } else if (var2 == 2 && this.z.u != null) {
         var4 = this.z.u[var3];
      }

      if (var4 == null) {
         return var1;
      } else {
         return var1 < var4.length ? var4[var1] : -1;
      }
   }

   private ArrayList a(int var1, byte var2) {
      ArrayList var3 = new ArrayList();
      int var4;
      zbrd var5;
      if (var1 == 1) {
         for(var4 = 0; var4 < this.s.size(); ++var4) {
            var5 = (zbrd)this.s.get(var4);
            if (var2 == 1) {
               if (var5.c == 0 || var5.c == 13 || var5.c == 14) {
                  continue;
               }
            } else if (var2 == 0) {
               if (var5.c != 0) {
                  continue;
               }
            } else if (var2 == 3 && var5.c == 13) {
               continue;
            }

            com.aspose.cells.b.a.a.ze.a(var3, (Object)var4);
         }
      } else if (var1 == 2) {
         for(var4 = 0; var4 < this.t.size(); ++var4) {
            var5 = (zbrd)this.t.get(var4);
            if (var2 == 1) {
               if (var5.c == 0 || var5.c == 13 || var5.c == 14) {
                  continue;
               }
            } else if (var2 == 0 && var5.c != 0) {
               continue;
            }

            com.aspose.cells.b.a.a.ze.a(var3, (Object)var4);
         }
      }

      return var3;
   }

   private void a(ArrayList var1, ArrayList var2, ArrayList var3, ArrayList var4) {
      for(int var5 = 0; var5 < var1.size(); ++var5) {
         zbqw var6 = (zbqw)var1.get(var5);
         short var7 = (short)(var6.b() & '\uffff');
         if (var7 != -2 && var7 != 254) {
            int var8 = this.c.getBaseFields().get(var7).m;
            if (var8 == 1) {
               this.a(this.c.getBaseFields().get(var7).getPosition(), var6, var2);
            } else if (var8 == 2) {
               this.a(this.c.getBaseFields().get(var7).getPosition(), var6, var3);
            } else if (var8 == 4) {
               this.a(this.c.getBaseFields().get(var7).getPosition(), var6, var4);
            }
         } else if (this.q == 1) {
            this.a(this.r, var6, var2);
         } else if (this.q == 2) {
            this.a(this.r, var6, var3);
         }
      }

   }

   private void a(int var1, zbqw var2, ArrayList var3) {
      boolean var4 = false;

      for(int var5 = 0; var5 < var3.size(); ++var5) {
         zbqw var6 = (zbqw)var3.get(var5);
         boolean var7 = false;
         short var8 = (short)(var6.b() & '\uffff');
         int var9;
         if (var8 != -2 && var8 != 254) {
            var9 = this.c.getBaseFields().get(var8).getPosition();
         } else {
            var9 = this.r;
         }

         if (var1 < var9) {
            var3.add(var5, var2);
            var4 = true;
            break;
         }
      }

      if (!var4) {
         com.aspose.cells.b.a.a.ze.a(var3, (Object)var2);
      }

   }

   private ArrayList a(ArrayList var1, int var2, boolean var3) {
      byte var4 = 0;
      zbqw var5 = (zbqw)var1.get(var1.size() - 1);
      boolean var6 = false;
      int var7 = 0;
      int var14;
      if ((((zbqw)var1.get(var1.size() - 1)).a() & '\uffff') > 1) {
         if (!((zbqw)var1.get(var1.size() - 1)).d) {
            var4 = 1;
         } else {
            var4 = 3;
         }
      } else if ((short)(var5.b() & '\uffff') == -2 && var1.size() >= 2 && (((zbqw)var1.get(var1.size() - 2)).a() & '\uffff') > 1) {
         if (!((zbqw)var1.get(var1.size() - 2)).d) {
            var4 = 1;
            if (var5.c.size() > 0) {
               var6 = true;
               var7 = (Integer)var5.c.get(0);
               var1.remove(var1.size() - 1);
            }
         } else {
            var4 = 3;
         }
      } else if (var2 == 1 && var1.size() < this.u) {
         short var8 = (short)(((zbqw)var1.get(var1.size() - 1)).b() & '\uffff');
         boolean var9 = false;
         if (var8 == -2) {
            var14 = this.r;
         } else {
            var14 = this.c.getBaseFields().get(var8).getPosition();
         }

         if (var8 >= 0 && var14 < this.u - 1 && this.c.getBaseFields().get(var8).getShowInOutlineForm()) {
            var4 = 3;
         }
      }

      ArrayList var13 = this.a(var2, var4);
      if (var13.size() == 0) {
         return var13;
      } else {
         for(var14 = 0; var14 < var1.size(); ++var14) {
            this.a((zbqw)var1.get(var14), var13, var2, false, var4, var6, var7);
         }

         if (var4 == 3) {
            short var15 = (short)(((zbqw)var1.get(var1.size() - 1)).b() & '\uffff');
            if (var15 != -2 && this.c.getBaseFields().get(var15).getShowInOutlineForm() && !this.c.getBaseFields().get(var15).getShowSubtotalAtTop()) {
               ArrayList var10 = new ArrayList();

               for(int var11 = 0; var11 < var13.size(); ++var11) {
                  zbrd var12 = (zbrd)this.s.get((Integer)var13.get(var11));
                  if (var3) {
                     if (var12.c != 0 && var12.c != 13 && var12.c != 14) {
                        com.aspose.cells.b.a.a.ze.a(var10, var13.get(var11));
                     }
                  } else if (var12.c == 0) {
                     com.aspose.cells.b.a.a.ze.a(var10, var13.get(var11));
                  }
               }

               if (var10.size() > 0) {
                  var13 = var10;
               }
            }
         }

         return var13;
      }
   }

   private Style g(int var1) {
      Style var2 = null;
      if (var1 >= 0 && var1 < this.c.ac.getCount()) {
         var2 = new Style(this.y);
         var2.copy(this.c.ac.a(var1));
      }

      return var2;
   }
}
